The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DBIx::Table::TestDataGenerator::DBDriverUtils - Common DBI database handle methods

SUBROUTINES/METHODS

get_in_memory_dsn

Arguments: none

Returns the dsn for an in memory SQLite database, see comment for get_in_memory_dbh.

get_in_memory_dbh

Arguments: none

Returns a database handle for a new in-memory database. This is needed for running the module install tests in case the TDG_... environment variables have not been set. The in-memory database is a SQLite database provided by the wonderful DBD::Sqlite module.

get_dbh

Arguments: DBI data source name, user and password

Returns the corresponding database handle if a connection can be established, croaks otherwise. If the data source name has not been passed, an in-memory SQLite database is created and the returned database handle points to it.

db_driver_name

Argument: database handle $dbh

Return Value: db driver name determined from $dbh. Note that the corresponding TableProbe role impersonating class must have this name as last part of it package name.

check_db_handle

Argument: database handle $dbh

Pings database with handle $dbh to check if it is available, aborts if not.

get_database

Argument: database handle $dbh

Returns the database name as determined from the database handle.

AUTHOR

Jose Diaz Seng, <josediazseng at gmx.de>

LICENSE AND COPYRIGHT

Copyright 2012 Jose Diaz Seng.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.