DBICx::TestDatabase man page on Pidora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Pidora logo
[printable version]

DBICx::TestDatabase(3)User Contributed Perl DocumentatioDBICx::TestDatabase(3)

NAME
       DBICx::TestDatabase - create a temporary database from a
       DBIx::Class::Schema

SYNOPSIS
       Given a DBIx::Class::Schema at "MyApp::Schema", create a test database
       like this:

	  use DBICx::TestDatabase;
	  my $schema = DBICx::TestDatabase->new('MyApp::Schema');

       Then you can use $schema normally:

	  $schema->resultset('Blah')->create({ blah => '123' });

       When your program exits, the temporary database will go away.

DESCRIPTION
       This module creates a temporary SQLite database, deploys your DBIC
       schema, and then connects to it.	 This lets you easily test your DBIC
       schema.	Since you have a fresh database for every test, you don't have
       to worry about cleaning up after your tests, ordering of tests
       affecting failure, etc.

METHODS
   new($schema)
       Loads $schema and returns a connection to it.

   connect
       Alias for new.

ENVIRONMENT
       You can control the behavior of this module at runtime by setting
       environment variables.

   DBIC_KEEP_TEST
       If this variable is true, then the test database will not be deleted at
       "END" time.  Instead, a message containing the paths of the test
       databases will be printed.

       This is good if you want to look at the database your test generated,
       for debugging.

AUTHOR
       Jonathan Rockway "<jrockway@cpan.org>"

LICENSE
       Copyright (c) 2007 Jonathan Rockway.

       This program is free software.  You may use, modify, and redistribute
       it under the same terms as Perl itself.

perl v5.14.1			  2008-07-07		DBICx::TestDatabase(3)
[top]

List of man pages available for Pidora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net