5 dbic_tool_make_schema_at.pl.
6 A script to create the DBIx::Class objects using the DBIx::Class::Schema::Loader (version.1.0.).
12 dbic_tool_make_schema_at.pl [-h] -p <module_path> -d <dir> -s <schema> -D <dbname> -H <dbhost>
20 B<module_path> the module path used to create the different DBIx::Class objects (example: CXGN::SEDM::Schema) (mandatory)
24 B<directory> the directory where the objects will be created (example: /data/local/perllib/CXGN) (mandatory)
28 B<schema> the schema of the database that will be used to create the DBIx::Class objects (example: sed) (mandatory)
32 B<db_name> the database name to access to the database (mandatory)
36 B<db_hostname> the database hostname to access to the database (mandatory)
48 This script create the objects for the DBIx::Class
54 Aureliano Bombarely Gomez.
61 dbic_tool_make_schema_at.pl
70 use CXGN
::DB
::InsertDBH
;
71 use DBIx
::Class
::Schema
::Loader qw
/ make_schema_at /;
73 our ($opt_p, $opt_d, $opt_s, $opt_D, $opt_H, $opt_h);
74 getopts
("p:d:s:D:H:h");
75 if (!$opt_p && !$opt_d && !$opt_s && !$opt_D && !$opt_H && !$opt_h) {
76 print "There are n\'t any tags. Print help\n\n";
80 my $path = $opt_p || die("None module path was supplied as -p <module_structure_path> argument.\n");
81 my $dir = $opt_d || die("None directory was supplied as -d <directory> argument.\n");
82 my $schema = $opt_s || die("None database schema was supplied as -s <dbschema> argument.\n");
83 my $db = $opt_D || die("None database name was supplied as -D <dbname> argument.\n");
84 #my $user = $opt_U || die("None database username was supplied as -U <dbuser> argument.\n");
85 #my $pass = $opt_P || die("None database password was supplied as -P <dbpass> argument.\n");
86 my $host = $opt_H || die("None database hostname was supplied as -H <dbhost> argument.\n");
89 print "\n\nParameters:\n\tPATH: $path\n\tDIR: $dir\n\tSCHEMA: $schema\n\tDB_NAME: $db\n\tDB_HOST: $host\n\n";
90 my $dbh = CXGN
::DB
::InsertDBH
->new({ dbname
=> $db, dbhost
=> $host })->get_actual_dbh();
95 { debug
=> 1, dump_directory
=> $dir, db_schema
=> $schema },
103 Desc: print help of this script
106 Side_Effects: exit of the script
107 Example: if (!@ARGV) {
118 A script to create the DBIx::Class objects using the DBIx::Class::Schema::Loader
121 dbic_tool_make_schema_at.pl [-h] -p <module_path> -d <dir> -s <schema> -U <username> -D <dbname> -H <dbhost> -P <dbpass>
124 -p <module_path> the module path used to create the different DBIx::Class objects (example: CXGN::SEDM::Schema) (mandatory)
125 -d <directory> the directory where the objects will be created (example: /data/local/perllib/CXGN) (mandatory)
126 -s <schema> the schema of the database that will be used to create the DBIx::Class objects (example: sed) (mandatory)
127 -D <db_name> the database name to access to the database (mandatory)
128 -H <db_hostname> the database hostname to access to the database (mandatory)
129 -h <help> show the help