File: Build.PL

package info (click to toggle)
libdata-formvalidator-perl 4.70-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 676 kB
  • sloc: perl: 2,839; makefile: 2
file content (66 lines) | stat: -rw-r--r-- 1,955 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
shift(@ARGV) if $ARGV[0] eq 'Build'; # accomodate with CPAN autoinstall
use Module::Build;

my $class = Module::Build->subclass(
	 class => 'Data::FormValidator::Builder',
	 code => q{
	 	sub ACTION_dist {
			my $self = shift;
			`perldoc -t lib/Data/FormValidator.pm>README`;
			$self->SUPER::ACTION_dist;
	 	}

        sub ACTION_cover {
            my $self = shift;
            $self->depends_on('build');

            system qw( cover -delete );

            # sometimes we get failing tests, which makes Test::Harness
            # die.  catch that
            eval {
                local $ENV{PERL5OPT} = "-MDevel::Cover=-summary,0";
                $self->ACTION_test(@_);
            };
            system qw( cover -report html );
        }
 	},
);


$class->new(
    # Makefile.PL is maintained manually now because the 5.8 requirement wasn't getting
    # translated automatically. 
    # create_makefile_pl  => 'traditional', 
    dist_author         => 'Mark Stosberg <mark@summersault.com>',
	module_name => 'Data::FormValidator',
	license => 'perl',
    configure_requires => { 'Module::Build' => 0.38 },
	requires => {
         # In 5.6, t/upload* was failing.
         # rjbs says "It relies on CGI relying on 5.008 glob stringification behavior"
         perl             => '5.008',
		'Image::Size' 	  => 0,
		'Test::More'  	  => 0,
		'Date::Calc'	  => 5.0,
		'File::MMagic'    => 1.17,
		'MIME::Types'	  => 1.005,
		'Regexp::Common'  => 0,
        'overload'        => 0,
        'Perl6::Junction' => 1.10, 
        'Scalar::Util'    => 0,
        'Email::Valid'    => 0,
	},
    build_requires        => {
        # For testing
        'CGI'             => 3.48,
    },
    meta_merge     => {
        resources =>
            { repository => 'http://mark.stosberg.com/darcs_hive/dfv/', },
        no_index => {
            'package' => ['Data::FormValidator::Constraints::RegexpCommon'],
        },
    },
)->create_build_script;