Test::TempDatabase

Test::TempDatabase is a Perl module for temporary database creation and destruction.
Download

Test::TempDatabase Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Boris Sukholitko
  • Publisher web site:
  • http://search.cpan.org/~bosu/HTML-Tested-ClassDBI-0.19/lib/HTML/Tested/ClassDBI.pm

Test::TempDatabase Tags


Test::TempDatabase Description

Test::TempDatabase is a Perl module for temporary database creation and destruction. Test::TempDatabase is a Perl module for temporary database creation and destruction.SYNOPSIS use Test::TempDatabase; my $td = Test::TempDatabase->create(dbname => 'temp_db'); my $dbh = $td->handle; ... some tests ... # Test::TempDatabase drops databaseThis module automates creation and dropping of test databases.USAGECreate test database using Test::TempDatabase->create. Use handle to get a handle to the database. Database will be automagically dropped when Test::TempDatabase instance goes out of scope.$class->become_postgres_userWhen running as root, this function becomes different user. It decides on the user name by probing TEST_TEMP_DB_USER, SUDO_USER environment variables. If these variables are empty, default "postgres" user is used.createCreates temporary database. It will be dropped when the resulting instance will go out of scope.Arguments are passed in as a keyword-value pairs. Available keywords are:dbname: the name of the temporary database.rest: the rest of the database connection string. It can be used to connect to a different host, etc.username, password: self-explanatory. Requirements: · Perl


Test::TempDatabase Related Software