new
my $cdmi = CDMIClient->new_for_script(%options);
Construct a new CDMI client object for a command-line script. This method uses a call to "getoptions" in GetOpt::Long to parse the command-line options, with the incoming options parameter as a parameter. The following command-line options (all of which are optional) will also be processed by this method and used to construct the CDMI object.
If the command-line parse fails, an undefined value will be returned rather than a CDMI object.
The CDMIClient object can create either a CDMI_APIClient object for accessing the CDMI over the network, or a CDMI_APIImpl object for accessing a local database. The latter will most likely only be used by developers of the CDMI. The --local
option must be passed to create the local database version.
- url
-
Web service url to connect to.
- local
-
Create an object to be used by a local database.
- loadDirectory
-
Data directory to be used by the loaders.
- DBD
-
XML database definition file.
- dbName
-
Name of the database to use.
- sock
-
Socket for accessing the database.
- userData
-
Name and password used to log on to the database, separated by a slash.
- dbhost
-
Database host name.
- port
-
MYSQL port number to use (MySQL only).
- dbms
-
Database management system to use (e.g.
postgres
, defaultmysql
).