DBIx-Transaction
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
$test_opts{dsn} =
exists($ENV{DBI_DSN}) ? $ENV{DBI_DSN} : (
($has_sqlite || $ENV{AUTOMATED_TESTING}) ? 'DBI:SQLite2:test_db' : ''
);
print "Please supply a DBI database source name (DSN) to connect with for the unit tests.\n";
print "Note that if your database is not fully transactional (such as older versions of MySQL ",
"these tests may fail.\n";
print "If this left blank, unit tests which depend on having a live database will be skipped.\n";
my $u = scalar getpwuid($<);
$test_opts{dsn} = prompt(qq{What DSN should we use for our unit tests? (eg; "DBI:Pg:dbname=$u")\n [$test_opts{dsn}]}, $test_opts{dsn});
if($test_opts{dsn} && $test_opts{dsn} !~ /^DBI:SQLITE2:/i) {
$test_opts{dsn_user} = prompt(" Username to connect to the database with:");
$test_opts{dsn_pass} = prompt(" Password to connect to the database with:");
}
WriteMakefile(
NAME => 'DBIx::Transaction',
VERSION_FROM => 'lib/DBIx/Transaction.pm', # finds $VERSION
( run in 0.258 second using v1.01-cache-2.11-cpan-8d75d55dd25 )