[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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




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@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