summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2006-10-10 15:04:09 +0000
committerSteve Peters <steve@fisharerojo.org>2006-10-10 15:04:09 +0000
commitb3217f3b82de9e927c4f63073394027ba0773014 (patch)
tree3dffa4f2298ac4b9e5dc4423814b1b9ae7c6842a
parenta85f5f830de99e846a58c552c8fda7263c54db75 (diff)
downloadperl-b3217f3b82de9e927c4f63073394027ba0773014.tar.gz
Upgrade to ExtUtils-Manifest-1.49.
p4raw-id: //depot/perl@28988
-rw-r--r--lib/ExtUtils/Manifest.pm5
-rw-r--r--lib/ExtUtils/t/Manifest.t16
2 files changed, 12 insertions, 9 deletions
diff --git a/lib/ExtUtils/Manifest.pm b/lib/ExtUtils/Manifest.pm
index ea1c06797f..70c1ef8384 100644
--- a/lib/ExtUtils/Manifest.pm
+++ b/lib/ExtUtils/Manifest.pm
@@ -13,7 +13,7 @@ use vars qw($VERSION @ISA @EXPORT_OK
$Is_MacOS $Is_VMS
$Debug $Verbose $Quiet $MANIFEST $DEFAULT_MSKIP);
-$VERSION = '1.48';
+$VERSION = '1.49';
@ISA=('Exporter');
@EXPORT_OK = qw(mkmanifest
manicheck filecheck fullcheck skipcheck
@@ -350,11 +350,14 @@ sub _maniskip {
open M, $mfile or open M, $DEFAULT_MSKIP or return sub {0};
while (<M>){
chomp;
+ s/\r//;
next if /^#/;
next if /^\s*$/;
push @skip, _macify($_);
}
close M;
+ return sub {0} unless (scalar @skip > 0);
+
my $opts = $Is_VMS ? '(?i)' : '';
# Make sure each entry is isolated in its own parentheses, in case
diff --git a/lib/ExtUtils/t/Manifest.t b/lib/ExtUtils/t/Manifest.t
index 396789e7b5..a546bc1ebc 100644
--- a/lib/ExtUtils/t/Manifest.t
+++ b/lib/ExtUtils/t/Manifest.t
@@ -46,7 +46,7 @@ sub read_manifest {
}
sub catch_warning {
- my $warn;
+ my $warn = '';
local $SIG{__WARN__} = sub { $warn .= $_[0] };
return join('', $_[0]->() ), $warn;
}
@@ -72,7 +72,7 @@ ok( chdir( 'mantest' ), 'chdir() to mantest' );
ok( add_file('foo'), 'add a temporary file' );
# there shouldn't be a MANIFEST there
-my ($res, $warn) = catch_warning( \&mkmanifest );
+my ($res, $warn) = catch_warning( \&mkmanifest );
# Canonize the order.
$warn = join("", map { "$_|" }
sort { lc($a) cmp lc($b) } split /\r?\n/, $warn);
@@ -97,10 +97,10 @@ like( $warn, qr/^Not in MANIFEST: bar/, 'warning that bar has been added' );
is( $res, 'bar', 'bar reported as new' );
# now quiet the warning that bar was added and test again
-($res, $warn) = do { local $ExtUtils::Manifest::Quiet = 1;
- catch_warning( \&skipcheck )
+($res, $warn) = do { local $ExtUtils::Manifest::Quiet = 1;
+ catch_warning( \&skipcheck )
};
-cmp_ok( $warn, 'eq', '', 'disabled warnings' );
+is( $warn, '', 'disabled warnings' );
# add a skip file with a rule to skip itself (and the nonexistent glob '*baz*')
add_file( 'MANIFEST.SKIP', "baz\n.SKIP" );
@@ -164,7 +164,7 @@ is( ExtUtils::Manifest::maniread()->{none}, '#none',
ok( mkdir( 'copy', 0777 ), 'made copy directory' );
$files = maniread();
eval { (undef, $warn) = catch_warning( sub {
- manicopy( $files, 'copy', 'cp' ) })
+ manicopy( $files, 'copy', 'cp' ) })
};
like( $@, qr/^Can't read none: /, 'croaked about none' );
@@ -179,7 +179,7 @@ like($warn, qr/^Skipping MANIFEST.SKIP/i, 'warned about MANIFEST.SKIP' );
local $ExtUtils::Manifest::MANIFEST = 'albatross';
($res, $warn) = catch_warning( \&mkmanifest );
like( $warn, qr/Added to albatross: /, 'using a new manifest file' );
-
+
# add the new file to the list of files to be deleted
$Files{'albatross'}++;
}
@@ -200,7 +200,7 @@ add_file( 'MANIFEST' => "foobar\n" );
add_file( 'foobar' => '123' );
($res, $warn) = catch_warning( \&manicheck );
is( $res, '', 'MANIFEST overrides MANIFEST.SKIP' );
-is( $warn, undef, 'MANIFEST overrides MANIFEST.SKIP, no warnings' );
+is( $warn, '', 'MANIFEST overrides MANIFEST.SKIP, no warnings' );
$files = maniread;
ok( !$files->{wibble}, 'MANIFEST in good state' );