File: Makefile.PL

package info (click to toggle)
libtest-www-mechanize-perl 1.52-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 372 kB
  • sloc: perl: 2,570; makefile: 4
file content (71 lines) | stat: -rw-r--r-- 2,201 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
67
68
69
70
71
use strict;
use warnings;
use ExtUtils::MakeMaker;

my $parms = {
    NAME                => 'Test::WWW::Mechanize',
    AUTHOR              => 'Andy Lester <andy@petdance.com>',
    VERSION_FROM        => 'Mechanize.pm',
    ABSTRACT_FROM       => 'Mechanize.pm',
    PL_FILES            => {},
    PREREQ_PM => {
        'parent'                    => 0,
        'Carp'                      => 0,
        'Carp::Assert::More'        => 0,
        'HTML::Form'                => 0,
        'HTTP::Server::Simple'      => '0.42',
        'HTTP::Server::Simple::CGI' => 0,
        'HTML::TokeParser'          => 0,
        'LWP'                       => 6.02,
        'Test::Builder::Tester'     => '1.09',
        'Test::LongString'          => '0.15',
        'Test::More'                => '0.96', # subtest() and done_testing()
        'URI::file'                 => 0,
        'WWW::Mechanize'            => '1.68',
    },
    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
    clean               => { FILES => 'Test-WWW-Mechanize-*' },
};

if ( $ExtUtils::MakeMaker::VERSION =~ /^\d\.\d\d$/ and $ExtUtils::MakeMaker::VERSION > 6.30 ) {
    $parms->{LICENSE} = 'artistic_2';
}

if ( $ExtUtils::MakeMaker::VERSION ge '6.46' ) {
    $parms->{META_MERGE} = {
        resources => {
            license     => 'http://www.opensource.org/licenses/artistic-license-2.0',
            homepage    => 'https://github.com/petdance/test-www-mechanize',
            bugtracker  => 'https://github.com/petdance/test-www-mechanize/issues',
            repository  => 'https://github.com/petdance/test-www-mechanize',
        }
    };
}
if ( $ExtUtils::MakeMaker::VERSION ge '6.48' ) {
    $parms->{MIN_PERL_VERSION} = 5.008;
}

my $module = 'HTML::Lint 2.20';
if ( not eval "use $module; 1;" ) {
    print "You don't have $module installed, so cannot use autolinting.\n";
}

WriteMakefile( %{$parms} );


sub MY::postamble {
    return <<'MAKE_FRAG';
.PHONY: critic tags

critic:
	perlcritic -1 -q -profile perlcriticrc Mechanize.pm t/

tags:
	ctags -f tags --recurse --totals \
		--exclude=blib \
		--exclude=.svn \
		--exclude='*~' \
		--languages=Perl --langmap=Perl:+.t \

MAKE_FRAG
}