-#!./perl
+#!/usr/bin/perl
BEGIN {
- chdir 't' if -d 't';
- unshift @INC, '../lib';
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ unshift @INC, '../lib';
+ }
}
+chdir 't';
# these files help the test run
use Test::More tests => 31;
}
# use module, import functions
-use_ok( 'ExtUtils::Manifest',
- qw( mkmanifest manicheck filecheck fullcheck maniread manicopy) );
+BEGIN { use_ok( 'ExtUtils::Manifest',
+ qw( mkmanifest manicheck filecheck fullcheck maniread manicopy) ); }
my $cwd = Cwd::getcwd();
is( $res, 'bar', 'bar reported as new' );
# now quiet the warning that bar was added and test again
-use vars qw($ExtUtils::Manifest::Quiet);
-$ExtUtils::Manifest::Quiet = 1;
+{ package ExtUtils::Manifest; use vars qw($Quiet); $Quiet = 1; }
($res, $warn) = catch_warning( \&ExtUtils::Manifest::skipcheck );
cmp_ok( $warn, ,'eq', '', 'disabled warnings' );
'carped about none' );
# tell ExtUtils::Manifest to use a different file
-use vars qw($ExtUtils::Manifest::MANIFEST);
-$ExtUtils::Manifest::MANIFEST = 'albatross';
+{ package ExtUtils::Manifest;
+ use vars qw($MANIFEST);
+ $MANIFEST = 'albatross';
+}
($res, $warn) = catch_warning( \&mkmanifest );
like( $warn, qr/Added to albatross: /, 'using a new manifest file' );