File: Makefile.PL

package info (click to toggle)
libclass-factory-perl 1.06-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid, stretch
  • size: 116 kB
  • ctags: 36
  • sloc: perl: 246; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 710 bytes parent folder | download | duplicates (3)
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
use ExtUtils::MakeMaker;

my %opts = (
    'NAME'         => 'Class::Factory',
    'VERSION_FROM' => 'lib/Class/Factory.pm',
);

if ( $ExtUtils::MakeMaker::VERSION >= 5.43 ) {
    $opts{AUTHOR}   = 'Chris Winters <chris@cwinters.com';
    $opts{ABSTRACT} = 'Useful base class for factory classes',
}

WriteMakefile( %opts );

sub MY::test {

    my $test = shift->MM::test(@_);

	eval { require Test::More } && ($Test::More::VERSION >= 0.62) 
or return <<EOF;
test::
\t\@echo sorry, cannot run tests without Test::More 0.62
EOF

    if ( eval { require Devel::Cover } ) {
        $test .= <<EOF;
testcover ::
	cover -delete
	HARNESS_PERL_SWITCHES=-MDevel::Cover make test
	cover
EOF
    }

    return $test;
}