1#!perl
2# $Id: Build.PL 3 2005-02-22 01:38:39Z daisuke $
3#
4# Daisuke Maki <dmaki@cpan.org>
5# All rights reserved.
6
7use strict;
8use Module::Build;
9
10my $st = Module::Build->check_installed_status('DBD::SQLite');
11my $HAVE_SQLITE = $st->{ok} || 0;
12if ($HAVE_SQLITE) {
13    print " + You have DBD::SQLite installed. Enabling SQLite tests.\n";
14} else {
15    print " + You don't have DBD::SQLite installed. Disabling SQLite tests.\n";
16}
17
18my $class = Module::Build->subclass(
19    code => qq|
20        sub ACTION_test {
21            \$ENV{HAVE_SQLITE} = $HAVE_SQLITE;
22            shift->SUPER::ACTION_test(\@_);
23        }
24    |
25);
26my $build = $class->new(
27    module_name => 'Class::DBI::LazyInflate',
28    requires => {
29        'Class::DBI' => 0,
30        'Data::Lazy' => 0
31    },
32    license => 'perl',
33    create_makefile_pl => 'traditional',
34    create_readme => 1,
35);
36
37$build->create_build_script;