Config::DBIConfig::DBI provides database connection support via Config::ApacheFormat files. | |
Download |
Config::DBI Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Terrence Brannon
- Publisher web site:
- http://search.cpan.org/~tbone/
Config::DBI Tags
Config::DBI Description
Config::DBI provides database connection support via Config::ApacheFormat files. Config::DBI provides database connection support via Config::ApacheFormat files.SYNOPSISIn .cshrc: setenv DBI_CONF dbi.confIn dbi.conf: # Pass may be a password, or in which case, the password is # is prompted for: Pass < STDIN > # Connect attribute # dbi_connect_method is a standard part of DBI. Its casing does differ from # all other attributes, but I did not create the DBI spec, I am simply # following it: # http://search.cpan.org/~timb/DBI-1.38/DBI.pm#DBI_Class_Methods # Other options for this value are: connect_cached, Apache::DBI::connect dbi_connect_method connect # Attributes common to all handles and settable # Listed in the order given in the DBI docs. # http://search.cpan.org/~timb/DBI/DBI.pm#METHODS_COMMON_TO_ALL_HANDLES Warn 1 InactiveDestroy PrintError 0 PrintWarn 1 RaiseError 0 HandleError Exception::Class::DBI->handler HandleSetErr sub { my ($handle, $err, $errstr, $state, $method) = @_; } ShowErrorStatement 1 TraceLevel 0 FetchHashKeyName NAME_lc ChopBlanks 0 LongReadLen 0 LongTruncOk 0 TaintIn 1 TaintOut 0 # omit Taint (shortcut to set both TaintIn and TaintOut) Profile 0 # Attributes for database handles # http://search.cpan.org/~timb/DBI/DBI.pm#Database_Handle_Attributes AutoCommit 0 RowCacheSize 0 # Connection info # Description of a database we would like to connect to < DBI basic > DSN dbi:Pg:dbname=mydb User postgres AutoCommit 1 < /DBI > # Description of another database < DBI basic_test > DSN dbi:Pg:dbname=mydb_test User test Pass test < /DBI >In Ye Olde Pure Perl Programme: use Config::DBI; my $dbh = Config::DBI->basic_test;Or: my %connect = Config::DBI->hash('basic_test'); Requirements: · Perl
Config::DBI Related Software