Fix a2p manpage (from Debian)
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / Packlist.t
index 3e455b7..58eaf8f 100644 (file)
@@ -1,9 +1,15 @@
-#!./perl
+#!/usr/bin/perl -w
 
 BEGIN {
-       chdir 't' if -d 't';
-       @INC = '../lib';
+    if( $ENV{PERL_CORE} ) {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
+    else {
+        unshift @INC, 't/lib';
+    }
 }
+chdir 't';
 
 use Test::More tests => 34;
 
@@ -33,7 +39,8 @@ is( ExtUtils::Packlist::FETCH($pl, 'foo'), 'bar', 'check FETCH()' );
 # test FIRSTKEY and NEXTKEY
 SKIP: {
        $pl->{data}{bar} = 'baz';
-       skip('not enough keys to test FIRSTKEY', 2) unless %{ $pl->{data} } > 2;
+       skip('not enough keys to test FIRSTKEY', 2) 
+      unless keys %{ $pl->{data} } > 2;
 
        # get the first and second key
        my ($first, $second) = keys %{ $pl->{data} };
@@ -85,7 +92,7 @@ SKIP: {
        chmod 0444, 'eplist';
 
        SKIP: {
-           skip("can write readonly files", 1) if -w 'eplist';
+           skip("cannot write readonly files", 1) if -w 'eplist';
 
            eval { ExtUtils::Packlist::write({}, 'eplist') };
            like( $@, qr/Can't open file/, 'write() should croak on open failure' );