OpenPlugin::Datasource::DBI

OpenPlugin::Datasource::DBI is a DBI driver, used to create DBI database handles for the OpenPlugin::Datasource plugin.
Download

OpenPlugin::Datasource::DBI Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Eric Andreychek and Chris Winters
  • Publisher web site:
  • http://search.cpan.org/~eric/OpenPlugin-0.11/OpenPlugin/Datasource/Template.pm

OpenPlugin::Datasource::DBI Tags


OpenPlugin::Datasource::DBI Description

OpenPlugin::Datasource::DBI is a DBI driver, used to create DBI database handles for the OpenPlugin::Datasource plugin. OpenPlugin::Datasource::DBI is a DBI driver, used to create DBI database handles for the OpenPlugin::Datasource plugin.SYNOPSIS # Define the parameters for a database handle 'main' in the config file type = DBI db_owner = username = webuser password = urkelnut dsn = host=localhost;database=urkelweb db_name = driver = mysql long_read_len = 65536 long_trunc_ok = 0 # Request the datasource 'main': my $dbh = $OP->datasource->connect( 'main' ); my $sth = $dbh->prepare( "SELECT * FROM urkel_fan" ); $sth->execute; ...No, we do not subclass DBI with this. No, we do not override any of the DBI methods. Instead, we provide the means to connect to the database from one location using nothing more than a datasource name. This is somewhat how the Java Naming and Directory Interface (JNDI) allows you to manage objects, including database connections.Note that if you are using it this should work flawlessly with Apache::DBI, and if you are using this on a different persistent Perl platform (say, PerlEx) then this module gives you a single location from which to retrieve database handles -- this makes using the BEGIN/END tricks ActiveState recommends in their FAQ pretty trivial. Requirements: · Perl


OpenPlugin::Datasource::DBI Related Software