NAME
T2::DBSetup - deploy T2 store during Makefile.PL
SYNOPSIS
# Example using traditional ExtUtils::MakeMaker
use ExtUtils::MakeMaker;
use lib "lib";
eval "use T2::DBSetup";
goto NOTESTS if $@;
# get the schema for your project...
eval "use T2::Schema";
goto NOTESTS if $@;
my $schema = $T2::Schema::class_obj;
T2::DBSetup->deploy("site_name", $schema)
or goto NOTESTS;
print("Great, the database was deployed successfully, now"
."I can continue with my testing...\n");
NOTESTS:
# just spit out a Makefile, so that automatic
# dependancies work.
WriteMakefile
(
'PREREQ_PM' => {
T2 => 0.08,
},
...
);
DESCRIPTION
The T2::DBSetup module allows for easily writing test suites that require a database to perform.
It prompts the user to provide database connection information, then writes that information to a place that your scripts can easily access.
BUGS
All current versions of Storable have a bug which affects loading of schema files.
See http://guest:guest@rt.perl.org/rt3/Ticket/Display.html?id=25145 for the current status of this bug.
Usually, you can re-run the Makefile.PL, and the different random hash seed chosen by Perl will prevent the segfault from occurring.