1use strict;
2use warnings;
3use ExtUtils::MakeMaker;
4
5my %parms = (
6    NAME                => 'Template::Timer',
7    AUTHOR              => 'Andy Lester <andy@petdance.com>',
8    VERSION_FROM        => 'Timer.pm',
9    ABSTRACT_FROM       => 'Timer.pm',
10    PL_FILES            => {},
11    PREREQ_PM => {
12        'Template'      => 0,
13        'Test::More'    => 0,
14        'Time::HiRes'   => 0,
15    },
16    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
17    clean               => { FILES => 'Template-Timer-*' },
18);
19
20if ( $ExtUtils::MakeMaker::VERSION ge '6.36' ) {
21    $parms{EXTRA_META} = <<EOF;
22resources:
23    license: http://dev.perl.org/licenses/
24    Repository: http://github.com/petdance/template-timer/
25EOF
26}
27
28
29WriteMakefile( %parms );
30
31sub MY::postamble {
32    my $postamble = <<'MAKE_FRAG';
33.PHONY: tags critic
34
35tags:
36	ctags -f tags --recurse --totals \
37		--exclude=blib \
38		--exclude=.svn \
39		--exclude='*~' \
40		--languages=Perl --langmap=Perl:+.t \
41
42critic:
43	perlcritic -1 -q -profile perlcriticrc Timer.pm t/*.t
44
45MAKE_FRAG
46
47    return $postamble;
48}
49