App::Dochazka::REST::ConnBank - Provide DBIx::Connector objects
use App::Dochazka::REST::ConnBank qw( $dbix_conn conn_status ); $dbix_conn->run( fixup => sub { ... } ); print "Database connection status: " . conn_status() . "\n"; # construct an arbitrary DBIx::Connector object my $conn = App::Dochazka::REST::ConnBank::get_arbitrary_dbix_conn( 'mydb', 'myuser', 'mypass' );
This module contains routines relating to DBIx::Connector. Mostly, the application uses the $dbix_conn singleton.
$dbix_conn
This module stores the DBIx::Connector singleton object that is imported by all modules that need to communicate with the database.
Wrapper for DBIx::Connector->new. Takes database name, database user and password. Returns a DBIx::Connector object (even if the database is unreachable).
Initialize the $dbix_conn singleton using dbname, dbuser, and dbpass values from site configuration.
Idempotent.
Given a DBIx::Connector object, call ping on the associated database handle and return true or false based on the result.
If no argument is given, returns the status of the $dbix_conn singleton.
Given a DBIx::Connector object, call ping on the associated database handle and return either 'UP' or 'DOWN' based on the result.
To install App::Dochazka::REST, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Dochazka::REST
CPAN shell
perl -MCPAN -e shell install App::Dochazka::REST
For more information on module installation, please visit the detailed CPAN module installation guide.