Debian lenny version packages
[pkg-perl] / deb-src / libtest-harness-perl / libtest-harness-perl-3.12 / Makefile.PL
1 #!/usr/bin/perl -w
2
3 # This Makefile.PL is provided for installation compatibility.
4 # Extra developer actions are in the Build.PL.
5
6 use ExtUtils::MakeMaker qw/WriteMakefile prompt/;
7
8 use strict;
9
10 my %mm_args = (
11     'NAME'         => 'Test::Harness',
12     'VERSION_FROM' => 'lib/Test/Harness.pm',
13     'PREREQ_PM'    => {
14         'File::Spec' => 0.8,
15     },
16     'INSTALLDIRS' => 'perl',
17     'PL_FILES'    => {},
18     'test'        => { 'TESTS' => 't/*.t t/compat/*.t' },
19     'EXE_FILES'   => ['bin/prove'],
20 );
21
22 {
23     local $^W = 0;    # Silence warning about non-numeric version
24     if ( $ExtUtils::MakeMaker::VERSION >= '6.31' ) {
25         $mm_args{LICENSE} = 'perl';
26     }
27 }
28
29 WriteMakefile(%mm_args);
30
31 package MY;
32
33 # Lifted from MM_Any.pm and modified so that make test tests against our
34 # own code rather than the incumbent. If we don't do this we end up
35 # loading a confused mixture of installed and new modules.
36 sub test_via_harness {
37     my ( $self, $perl, $tests ) = @_;
38
39     return $self->SUPER::test_via_harness(
40         qq{$perl "-I\$(INST_LIB)" "-I\$(INST_ARCHLIB)"}, $tests );
41 }