Debian lenny version packages
[pkg-perl] / deb-src / libfile-chdir-perl / libfile-chdir-perl-0.06 / Makefile.PL
1 # A template for Makefile.PL.
2 # - Set the $PACKAGE variable to the name of your module.
3 # - Set $LAST_API_CHANGE to reflect the last version you changed the API 
4 #   of your module.
5 # - Fill in your dependencies in PREREQ_PM
6 # Alternatively, you can say the hell with this and use h2xs.
7
8 use 5.004;
9
10 use ExtUtils::MakeMaker;
11
12 $PACKAGE = 'File::chdir';
13 ($PACKAGE_FILE = $PACKAGE) =~ s|::|/|g;
14 $LAST_API_CHANGE = 0.04;
15
16 eval "require $PACKAGE";
17
18 if(!$@ && ${$PACKAGE.'::VERSION'} < $LAST_API_CHANGE) {
19     print <<"CHANGE_WARN";
20
21 WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING
22
23 -----*****>>>>>     THE INTERFACE HAS CHANGED     <<<<<*****----------
24
25 The chdir() override has been ELIMINATED.  It's too complicated and
26 not worth the trouble.
27
28 WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING
29
30 We'll pause for 20 seconds...
31
32 CHANGE_WARN
33
34     sleep 20;
35 }
36
37 WriteMakefile(
38     NAME            => $PACKAGE,
39     VERSION_FROM    => "lib/$PACKAGE_FILE.pm", # finds $VERSION
40     PREREQ_PM       => { Cwd        => 0,
41                          File::Spec => 0,
42                        },
43     'dist'          => { COMPRESS   => 'gzip -9',
44                          SUFFIX     => '.gz',
45                          DIST_DEFAULT   => 'all tardist',
46                        },
47 );
48
49
50 {
51     package MY;
52
53     sub test_via_harness {
54         my($self, $orig_perl, $tests) = @_;
55
56         my @perls = ($orig_perl);
57         push @perls, qw(bleadperl 
58                         perl5.6.1
59                         perl5.6.0
60                         perl5.005_03 
61                         perl5.004_05 
62                         perl5.004_04
63                         perl5.004)
64           if $ENV{PERL_TEST_ALL};
65
66         my $out;
67         foreach my $perl (@perls) {
68             $out .= $self->SUPER::test_via_harness($perl, $tests);
69         }
70
71         return $out;
72     }
73 }