[Omaha.pm] Omni::DB::test()

Jay Hannah jay at jays.net
Mon Mar 21 14:51:47 PST 2005


I got tired of writing a 10 line "does our Perl -> Informix environment 
work?" program from memory, so I centralized that 10 lines into 
Omni::DB. Now I can find out command line if DBD::Informix is peachy:

$ perl -MOmni::DB -e 'Omni::DB::test'
There are 57 rows in omni at prod_tcp:hotels.

It's basically an ode to DBI's installed_versions() routine that is 
unbelievably handy:

$ perl -MDBI -e 'DBI->installed_versions'
   Perl            : 5.006001    (i686-linux)
   OS              : linux       (2.2.14-12)
   DBI             : 1.40
   DBD::Sybase     : 1.02
   DBD::Sponge     : 11.10
   DBD::Proxy      : install_driver(Proxy) failed: Can't locate 
RPC/PlClient.pm in @INC
   DBD::ODBC       : install_driver(ODBC) failed: ...
   DBD::Informix   : 0.95
   DBD::ExampleP   : 11.12
   DBD::ADO        : 0.14

j



More information about the Omaha-pm mailing list