4 use warnings FATAL => 'all';
6 my $class = Module::Build->subclass(
7 class => "Module::Build::Custom",
8 code => <<'SUBCLASS' );
12 if ( $self->notes('TEST_MYSQL_DSN') ) {
13 $ENV{$_} = $self->notes($_) for qw(
14 TEST_MYSQL_DSN TEST_MYSQL_USER TEST_MYSQL_PASS
17 if ( $self->notes( 'LONG_TESTS' ) ) {
20 $self->SUPER::ACTION_test;
24 my $build = $class->new(
25 module_name => 'DBM::Deep',
28 'perl' => '5.006_000',
30 'Scalar::Util' => '1.14',
31 'Digest::MD5' => '1.00',
34 'File::Path' => '0.01',
35 'File::Temp' => '0.01',
36 'Pod::Usage' => '1.3',
37 'Test::More' => '0.88',
38 'Test::Deep' => '0.095',
39 'Test::Warn' => '0.08',
40 'Test::Exception' => '0.21',
41 'IO::Scalar' => '0.01',
43 create_makefile_pl => 'traditional',
45 'META.yml', '*.bak', '*.gz', 'Makefile.PL', 'cover_db',
47 test_files => 't/??_*.t',
50 description => 'DBI support (mysql only so far)',
53 'DBD::mysql' => '4.001',
59 if ( $build->y_n( "Run the long-running tests", 'n' ) ) {
60 $build->notes( 'LONG_TESTS' => 1 );
63 if ( $build->features( 'dbi_engine' ) ) {
64 if ( $build->y_n( "Run the tests against the DBI engine (for MySQL only)?", 'n' ) ) {
65 my ($dsn, $user, $pass) = ('') x 3;
66 $dsn = $build->prompt( "\tWhat is the full DSN (for example 'dbi:mysql:test')" );
68 $user = $build->prompt( "\tWhat is the username?" );
70 $pass = $build->prompt( "\tWhat is the password?" );
74 $build->notes( 'TEST_MYSQL_DSN' => $dsn );
75 $build->notes( 'TEST_MYSQL_USER' => $user );
76 $build->notes( 'TEST_MYSQL_PASS' => $pass );
80 $build->create_build_script;