John Drago > Ima-DBI-Contextual > Ima::DBI::Contextual

Download:
Ima-DBI-Contextual-1.006.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.006   Source  

NAME ^

Ima::DBI::Contextual - Liteweight context-aware dbi handle cache and utility methods.

DEPRECATED ^

This module has been deprecated. Do not use.

SYNOPSIS ^

  package Foo;
  
  use base 'Ima::DBI::Contextual';
  
  my @dsn = ( 'DBI:mysql:dbname:hostname', 'username', 'password', {
    RaiseError => 0,
  });
  __PACKAGE__->set_db('Main', @dsn);

Then, elsewhere:

  my $dbh = Foo->db_Main;
  
  # Use $dbh like you normally would:
  my $sth = $dbh->prepare( ... );

DESCRIPTION ^

If you like Ima::DBI but need it to be more context-aware (eg: tie dbi connections to more than the name and process id) then you need Ima::DBI::Contextual.

RANT ^

Indications: For permanent relief of symptoms related to hosting multiple mod_perl web applications on one server, where each application uses a different database but they all refer to the database handle via Class->db_Main. Such symptoms may include:

SEE ALSO ^

Ima::DBI

AUTHOR ^

John Drago <jdrago_999@yahoo.com>

LICENSE ^

This software is Free software and may be used and redistributed under the same terms as Perl itself.

syntax highlighting: