diff options
Diffstat (limited to 'cpan/ExtUtils-MakeMaker/t')
40 files changed, 188 insertions, 172 deletions
diff --git a/cpan/ExtUtils-MakeMaker/t/00compile.t b/cpan/ExtUtils-MakeMaker/t/00compile.t index cdec1b977c..ba6baacce8 100644 --- a/cpan/ExtUtils-MakeMaker/t/00compile.t +++ b/cpan/ExtUtils-MakeMaker/t/00compile.t @@ -14,13 +14,13 @@ BEGIN { plan skip_all => 'No MANIFEST' unless -e "../MANIFEST"; - + chdir ".."; my $manifest = "MANIFEST"; open(my $manifest_fh, "<", $manifest) or die "Can't open $manifest: $!"; -my @modules = map { m{^lib/(\S+)}; $1 } - grep { m{^lib/\S+\.pm} } +my @modules = map { m{^lib/(\S+)}; $1 } + grep { m{^lib/\S+\.pm} } <$manifest_fh>; chomp @modules; diff --git a/cpan/ExtUtils-MakeMaker/t/INST.t b/cpan/ExtUtils-MakeMaker/t/INST.t index b5ece3e157..35251f8ba9 100644 --- a/cpan/ExtUtils-MakeMaker/t/INST.t +++ b/cpan/ExtUtils-MakeMaker/t/INST.t @@ -86,7 +86,7 @@ is( $mm->{PERM_RWX}, 755, 'PERM_RWX' ); # INST_* -is( $mm->{INST_ARCHLIB}, +is( $mm->{INST_ARCHLIB}, $mm->{PERL_CORE} ? $mm->{PERL_ARCHLIB} : File::Spec->catdir($Curdir, 'blib', 'arch'), 'INST_ARCHLIB'); @@ -96,7 +96,7 @@ is( $mm->{INST_BIN}, File::Spec->catdir($Curdir, 'blib', 'bin'), is( keys %{$mm->{CHILDREN}}, 1 ); my($child_pack) = keys %{$mm->{CHILDREN}}; my $c_mm = $mm->{CHILDREN}{$child_pack}; -is( $c_mm->{INST_ARCHLIB}, +is( $c_mm->{INST_ARCHLIB}, $c_mm->{PERL_CORE} ? $c_mm->{PERL_ARCHLIB} : File::Spec->catdir($Updir, 'blib', 'arch'), 'CHILD INST_ARCHLIB'); @@ -105,7 +105,7 @@ is( $c_mm->{INST_BIN}, File::Spec->catdir($Updir, 'blib', 'bin'), my $inst_lib = File::Spec->catdir($Curdir, 'blib', 'lib'); -is( $mm->{INST_LIB}, +is( $mm->{INST_LIB}, $mm->{PERL_CORE} ? $mm->{PERL_LIB} : $inst_lib, 'INST_LIB' ); diff --git a/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t b/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t index d2f605e468..bd82dbd410 100644 --- a/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t +++ b/cpan/ExtUtils-MakeMaker/t/INSTALL_BASE.t @@ -36,7 +36,7 @@ cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag(@mpl_out); my $makefile = makefile_name(); -ok( grep(/^Writing $makefile for Big::Dummy/, +ok( grep(/^Writing $makefile for Big::Dummy/, @mpl_out) == 1, 'Makefile.PL output looks right'); @@ -48,7 +48,7 @@ like( $install_out, qr/^Installing /m ); ok( -r '../dummy-install', ' install dir created' ); -my @installed_files = +my @installed_files = ('../dummy-install/lib/perl5/Big/Dummy.pm', '../dummy-install/lib/perl5/Big/Liar.pm', '../dummy-install/bin/program', diff --git a/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t b/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t index 5bd0a5dd80..12cdee19db 100644 --- a/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t +++ b/cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t @@ -120,8 +120,8 @@ my %Install_Vars = ( while( my($type, $vars) = each %Install_Vars) { SKIP: { - skip "VMS must expand macros in INSTALL* vars", scalar @$vars - if $Is_VMS; + skip "VMS must expand macros in INSTALL* vars", scalar @$vars + if $Is_VMS; skip '$Config{usevendorprefix} not set', scalar @$vars if $type eq 'VENDOR' and !$Config{usevendorprefix}; @@ -134,10 +134,10 @@ while( my($type, $vars) = each %Install_Vars) { if $mm->{uc $installvar} =~ /^\$\(INSTALL.*\)$/; # support for man page skipping - $prefix = 'none' if $type eq 'PERL' && - $var =~ /man/ && + $prefix = 'none' if $type eq 'PERL' && + $var =~ /man/ && !$Config{$installvar}; - like( $mm->{uc $installvar}, qr/^\Q$prefix\E/, + like( $mm->{uc $installvar}, qr/^\Q$prefix\E/, "$prefix + $var" ); } } @@ -185,9 +185,9 @@ while( my($type, $vars) = each %Install_Vars) { INSTALLMAN3DIR=> 'foo/bar/baz', ); - is( $mm->{INSTALLVENDORMAN1DIR}, File::Spec->catdir('foo','bar'), + is( $mm->{INSTALLVENDORMAN1DIR}, File::Spec->catdir('foo','bar'), 'installvendorman1dir (in %Config) not modified' ); - isnt( $mm->{INSTALLVENDORMAN3DIR}, '', + isnt( $mm->{INSTALLVENDORMAN3DIR}, '', 'installvendorman3dir (not in %Config) set' ); } @@ -224,7 +224,7 @@ while( my($type, $vars) = each %Install_Vars) { } -# Check that when usevendoprefix and installvendorman*dir aren't set in +# Check that when usevendoprefix and installvendorman*dir aren't set in # Config it leaves them unset. { _set_config(installman1dir => File::Spec->catdir('foo', 'bar') ); diff --git a/cpan/ExtUtils-MakeMaker/t/Liblist.t b/cpan/ExtUtils-MakeMaker/t/Liblist.t index 37d10a1c6e..934b83aa69 100644 --- a/cpan/ExtUtils-MakeMaker/t/Liblist.t +++ b/cpan/ExtUtils-MakeMaker/t/Liblist.t @@ -11,7 +11,7 @@ BEGIN { use_ok( 'ExtUtils::Liblist' ); } -ok( defined &ExtUtils::Liblist::ext, +ok( defined &ExtUtils::Liblist::ext, 'ExtUtils::Liblist::ext() defined for backwards compat' ); { diff --git a/cpan/ExtUtils-MakeMaker/t/MM_Any.t b/cpan/ExtUtils-MakeMaker/t/MM_Any.t index 672ff4dbd1..731c9767fc 100644 --- a/cpan/ExtUtils-MakeMaker/t/MM_Any.t +++ b/cpan/ExtUtils-MakeMaker/t/MM_Any.t @@ -18,7 +18,7 @@ can_ok( 'MM', 'os_flavor', 'os_flavor_is' ); my @flavors = MM->os_flavor; ok( @flavors, 'os_flavor() returned something' ); -ok( MM->os_flavor_is($flavors[rand @flavors]), +ok( MM->os_flavor_is($flavors[rand @flavors]), 'os_flavor_is() one flavor' ); ok( MM->os_flavor_is($flavors[rand @flavors], 'BogusOS'), ' many flavors' ); diff --git a/cpan/ExtUtils-MakeMaker/t/MM_BeOS.t b/cpan/ExtUtils-MakeMaker/t/MM_BeOS.t index be19058f65..0f9825b7c0 100644 --- a/cpan/ExtUtils-MakeMaker/t/MM_BeOS.t +++ b/cpan/ExtUtils-MakeMaker/t/MM_BeOS.t @@ -23,8 +23,8 @@ use File::Basename; # Does this mimic ExtUtils::MakeMaker ok? { @MM::ISA = qw( - ExtUtils::MM_Unix - ExtUtils::Liblist::Kid + ExtUtils::MM_Unix + ExtUtils::Liblist::Kid ExtUtils::MakeMaker ); # MM package faked up by messy MI entanglement @@ -38,7 +38,7 @@ my $MM = bless { NAME => "Foo" }, 'MM'; # init_linker { - my $libperl = File::Spec->catfile('$(PERL_INC)', + my $libperl = File::Spec->catfile('$(PERL_INC)', $Config{libperl} || 'libperl.a' ); my $export = ''; my $after = ''; diff --git a/cpan/ExtUtils-MakeMaker/t/MM_Cygwin.t b/cpan/ExtUtils-MakeMaker/t/MM_Cygwin.t index b518c8c79e..0655d17622 100644 --- a/cpan/ExtUtils-MakeMaker/t/MM_Cygwin.t +++ b/cpan/ExtUtils-MakeMaker/t/MM_Cygwin.t @@ -42,7 +42,7 @@ delete $MM->{CFLAGS}; # ExtUtils::MM_Cygwin::cflags() calls this, fake the output { - local $SIG{__WARN__} = sub { + local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /^Subroutine .* redefined/; }; *ExtUtils::MM_Unix::cflags = sub { return $_[1] }; diff --git a/cpan/ExtUtils-MakeMaker/t/MM_NW5.t b/cpan/ExtUtils-MakeMaker/t/MM_NW5.t index 3f6198f1a4..383e6d9541 100644 --- a/cpan/ExtUtils-MakeMaker/t/MM_NW5.t +++ b/cpan/ExtUtils-MakeMaker/t/MM_NW5.t @@ -47,18 +47,18 @@ SKIP: { skip( '$ENV{COMSPEC} not set', 2 ) unless $ENV{COMSPEC} =~ m!((?:[a-z]:)?[^|<>]+)!i; my $comspec = $1; - is( $MM->maybe_command( $comspec ), + is( $MM->maybe_command( $comspec ), $comspec, 'COMSPEC is a maybe_command()' ); ( my $comspec2 = $comspec ) =~ s|\..{3}$||; - like( $MM->maybe_command( $comspec2 ), - qr/\Q$comspec/i, + like( $MM->maybe_command( $comspec2 ), + qr/\Q$comspec/i, 'maybe_command() without extension' ); } my $had_pathext = exists $ENV{PATHEXT}; { local $ENV{PATHEXT} = '.exe'; - ok( ! $MM->maybe_command( 'not_a_command.com' ), + ok( ! $MM->maybe_command( 'not_a_command.com' ), 'not a maybe_command()' ); } # Bug in Perl. local $ENV{FOO} won't delete the key afterward. @@ -66,19 +66,19 @@ delete $ENV{PATHEXT} unless $had_pathext; # file_name_is_absolute() [Does not support UNC-paths] { - ok( $MM->file_name_is_absolute( 'SYS:/' ), + ok( $MM->file_name_is_absolute( 'SYS:/' ), 'file_name_is_absolute()' ); ok( ! $MM->file_name_is_absolute( 'some/path/' ), 'not file_name_is_absolute()' ); } -# find_perl() +# find_perl() # Should be able to find running perl... $^X is OK on NW5 { my $my_perl = $1 if $^X =~ /(.*)/; # are we in -T or -t? my( $perl, $path ) = fileparse( $my_perl ); - like( $MM->find_perl( $], [ $perl ], [ $path ] ), + like( $MM->find_perl( $], [ $perl ], [ $path ] ), qr/^\Q$my_perl\E$/i, 'find_perl() finds this perl' ); } @@ -86,10 +86,10 @@ delete $ENV{PATHEXT} unless $had_pathext; { my @path_eg = qw( SYS trick dir/now_OK ); - is( $MM->catdir( @path_eg ), + is( $MM->catdir( @path_eg ), 'SYS\\trick\\dir\\now_OK', 'catdir()' ); - is( $MM->catdir( @path_eg ), - File::Spec->catdir( @path_eg ), + is( $MM->catdir( @path_eg ), + File::Spec->catdir( @path_eg ), 'catdir() eq File::Spec->catdir()' ); # catfile() (calls MM_NW5->catdir) @@ -98,8 +98,8 @@ delete $ENV{PATHEXT} unless $had_pathext; is( $MM->catfile( @path_eg ), 'SYS\\trick\\dir\\now_OK\\file.ext', 'catfile()' ); - is( $MM->catfile( @path_eg ), - File::Spec->catfile( @path_eg ), + is( $MM->catfile( @path_eg ), + File::Spec->catfile( @path_eg ), 'catfile() eq File::Spec->catfile()' ); } @@ -108,7 +108,7 @@ delete $ENV{PATHEXT} unless $had_pathext; { my $mm_w32 = bless( {}, 'MM' ); $mm_w32->init_others(); - my @keys = qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP + my @keys = qw( TOUCH CHMOD CP RM_F RM_RF MV NOOP TEST_F LD AR LDLOADLIBS DEV_NULL ); for my $key ( @keys ) { ok( $mm_w32->{ $key }, "init_others: $key" ); @@ -118,7 +118,7 @@ delete $ENV{PATHEXT} unless $had_pathext; # constants() { my $mm_w32 = bless { - NAME => 'TestMM_NW5', + NAME => 'TestMM_NW5', VERSION => '1.00', VERSION_FROM => 'TestMM_NW5', PM => { 'MM_NW5.pm' => 1 }, @@ -201,19 +201,19 @@ EOSCRIPT skip( "Can't write to temp file: $!", 4 ) unless close SCRIPT; # now start tests: - is( $MM->perl_script( $script_name ), + is( $MM->perl_script( $script_name ), "${script_name}$script_ext", "perl_script ($script_ext)" ); skip( "Can't rename temp file: $!", 3 ) unless rename $script_name, "${script_name}.pl"; $script_ext = '.pl'; - is( $MM->perl_script( $script_name ), + is( $MM->perl_script( $script_name ), "${script_name}$script_ext", "perl_script ($script_ext)" ); skip( "Can't rename temp file: $!", 2 ) unless rename "${script_name}$script_ext", "${script_name}.bat"; $script_ext = '.bat'; - is( $MM->perl_script( $script_name ), + is( $MM->perl_script( $script_name ), "${script_name}$script_ext", "perl_script ($script_ext)" ); skip( "Can't rename temp file: $!", 1 ) @@ -221,7 +221,7 @@ EOSCRIPT $script_ext = '.noscript'; isnt( $MM->perl_script( $script_name ), - "${script_name}$script_ext", + "${script_name}$script_ext", "not a perl_script anymore ($script_ext)" ); is( $MM->perl_script( $script_name ), undef, "perl_script ($script_ext) returns empty" ); diff --git a/cpan/ExtUtils-MakeMaker/t/MM_OS2.t b/cpan/ExtUtils-MakeMaker/t/MM_OS2.t index 08d0e1abab..f0a3889d31 100644 --- a/cpan/ExtUtils-MakeMaker/t/MM_OS2.t +++ b/cpan/ExtUtils-MakeMaker/t/MM_OS2.t @@ -23,18 +23,18 @@ BEGIN { use File::Spec; use_ok( 'ExtUtils::MM_OS2' ); -ok( grep( 'ExtUtils::MM_OS2', @MM::ISA), +ok( grep( 'ExtUtils::MM_OS2', @MM::ISA), 'ExtUtils::MM_OS2 should be parent of MM' ); # dlsyms -my $mm = bless({ - SKIPHASH => { - dynamic => 1 - }, +my $mm = bless({ + SKIPHASH => { + dynamic => 1 + }, NAME => 'foo:bar::', }, 'ExtUtils::MM_OS2'); -is( $mm->dlsyms(), '', +is( $mm->dlsyms(), '', 'dlsyms() should return nothing with dynamic flag set' ); $mm->{BASEEXT} = 'baseext'; @@ -42,13 +42,13 @@ delete $mm->{SKIPHASH}; my $res = $mm->dlsyms(); like( $res, qr/baseext\.def: Makefile/, '... without flag, should return make targets' ); -like( $res, qr/"DL_FUNCS" => \{ \}/, +like( $res, qr/"DL_FUNCS" => \{ \}/, '... should provide empty hash refs where necessary' ); like( $res, qr/"DL_VARS" => \[]/, '... and empty array refs too' ); $mm->{FUNCLIST} = 'funclist'; $res = $mm->dlsyms( IMPORTS => 'imports' ); -like( $res, qr/"FUNCLIST" => .+funclist/, +like( $res, qr/"FUNCLIST" => .+funclist/, '... should pick up values from object' ); like( $res, qr/"IMPORTS" => .+imports/, '... and allow parameter options too' ); @@ -65,7 +65,7 @@ SKIP: { local $@; eval { $mm->dlsyms() }; - like( $@, qr/Can.t mkdir tmp_imp/, + like( $@, qr/Can.t mkdir tmp_imp/, '... should die if directory cannot be made' ); unlink('tmp_imp') or skip("Cannot remove test file: $!", 9); @@ -89,15 +89,15 @@ SKIP: { eval { $mm->dlsyms() }; like( $sysargs, qr/^emximp/, '... should try to call system() though' ); - like( $@, qr/Cannot make import library/, + like( $@, qr/Cannot make import library/, '... should die if emximp syscall fails' ); # sysfail is 0 now, call emximp call should succeed eval { $mm->dlsyms() }; is( $unlinked, 1, '... should attempt to unlink temp files' ); - like( $@, qr/Cannot extract import/, + like( $@, qr/Cannot extract import/, '... should die if other syscall fails' ); - + # make both syscalls succeed @sysfail = (0, 0); local $@; @@ -127,9 +127,9 @@ SKIP: { $args->{IMPORTS} = { foo => 1}; $ret = ExtUtils::MM_OS2::static_lib( $args ); is( $called, 2, '... should call parent method if extra imports passed' ); - like( $ret, qr/^called static_lib\n\t\$\(AR\) \$\(AR_STATIC_ARGS\)/m, + like( $ret, qr/^called static_lib\n\t\$\(AR\) \$\(AR_STATIC_ARGS\)/m, '... should append make tags to first line from parent method' ); - like( $ret, qr/\$@\n\n\nline2\nline3\n\nline4/m, + like( $ret, qr/\$@\n\n\nline2\nline3\n\nline4/m, '... should include remaining data from parent method' ); } @@ -164,7 +164,7 @@ is( ExtUtils::MM_OS2->replace_manpage_separator($sep), '.a.b.c.de', unless (defined $dir) { if (-d $file) { next if ( -x $file . '.exe' or -x $file . '.cmd' ); - + $dir = $file; $found++; } @@ -208,7 +208,7 @@ is( ExtUtils::MM_OS2->replace_manpage_separator($sep), '.a.b.c.de', SKIP: { skip('No appropriate directory found', 1) unless defined $dir; - is( ExtUtils::MM_OS2->maybe_command( $dir ), undef, + is( ExtUtils::MM_OS2->maybe_command( $dir ), undef, 'maybe_command() should ignore directories' ); } @@ -234,11 +234,11 @@ is( ExtUtils::MM_OS2->replace_manpage_separator($sep), '.a.b.c.de', } # file_name_is_absolute -ok( ExtUtils::MM_OS2->file_name_is_absolute( 's:/' ), +ok( ExtUtils::MM_OS2->file_name_is_absolute( 's:/' ), 'file_name_is_absolute() should be true for paths with volume and slash' ); -ok( ExtUtils::MM_OS2->file_name_is_absolute( '\foo' ), +ok( ExtUtils::MM_OS2->file_name_is_absolute( '\foo' ), '... and for paths with leading slash but no volume' ); -ok( ! ExtUtils::MM_OS2->file_name_is_absolute( 'arduk' ), +ok( ! ExtUtils::MM_OS2->file_name_is_absolute( 'arduk' ), '... but not for paths with no leading slash or volume' ); @@ -252,18 +252,18 @@ is( $mm->{PERL_ARCHIVE}, '$(PERL_INC)/libperl$(LIB_EXT)', 'PERL_ARCHIVE' ); my $aout = 0; local *OS2::is_aout; *OS2::is_aout = \$aout; - + $mm->init_linker; isnt( $mm->{PERL_ARCHIVE_AFTER}, '', 'PERL_ARCHIVE_AFTER should be empty without $is_aout set' ); $aout = 1; - is( $mm->{PERL_ARCHIVE_AFTER}, - '$(PERL_INC)/libperl_override$(LIB_EXT)', + is( $mm->{PERL_ARCHIVE_AFTER}, + '$(PERL_INC)/libperl_override$(LIB_EXT)', '... and has libperl_override if it is set' ); } # EXPORT_LIST -is( $mm->{EXPORT_LIST}, '$(BASEEXT).def', +is( $mm->{EXPORT_LIST}, '$(BASEEXT).def', 'EXPORT_LIST should add .def to BASEEXT member' ); END { diff --git a/cpan/ExtUtils-MakeMaker/t/MM_Unix.t b/cpan/ExtUtils-MakeMaker/t/MM_Unix.t index 55c29e32d8..60f53c4330 100644 --- a/cpan/ExtUtils-MakeMaker/t/MM_Unix.t +++ b/cpan/ExtUtils-MakeMaker/t/MM_Unix.t @@ -5,8 +5,8 @@ BEGIN { } chdir 't'; -BEGIN { - use Test::More; +BEGIN { + use Test::More; if( $^O =~ /^VMS|os2|MacOS|MSWin32|cygwin|beos|netware$/i ) { plan skip_all => 'Non-Unix platform'; @@ -26,9 +26,9 @@ my $class = 'ExtUtils::MM_Unix'; # only one of the following can be true # test should be removed if MM_Unix ever stops handling other OS than Unix my $os = ($ExtUtils::MM_Unix::Is{OS2} || 0) - + ($ExtUtils::MM_Unix::Is{Win32} || 0) + + ($ExtUtils::MM_Unix::Is{Win32} || 0) + ($ExtUtils::MM_Unix::Is{Dos} || 0) - + ($ExtUtils::MM_Unix::Is{VMS} || 0); + + ($ExtUtils::MM_Unix::Is{VMS} || 0); cmp_ok ( $os, '<=', 1, 'There can be only one (or none)'); is($ExtUtils::MM_Unix::VERSION, $ExtUtils::MakeMaker::VERSION, 'MM_Unix has a $VERSION'); @@ -45,7 +45,7 @@ is ($class->catdir('xx','xx'), File::Spec->catdir('xx','xx'), is ($class->catfile('xx','xx','yy'), File::Spec->catfile('xx','xx','yy'), 'catfile(xx, xx) => xx/xx'); -is ($class->file_name_is_absolute('Bombdadil'), +is ($class->file_name_is_absolute('Bombdadil'), File::Spec->file_name_is_absolute('Bombdadil'), 'file_name_is_absolute()'); @@ -130,7 +130,7 @@ ok ( join (' ', $class->dist_basics()), 'distclean :: realclean distcheck'); # has_link_code tests my $t = bless { NAME => "Foo" }, $class; -$t->{HAS_LINK_CODE} = 1; +$t->{HAS_LINK_CODE} = 1; is ($t->has_link_code(),1,'has_link_code'); is ($t->{HAS_LINK_CODE},1); $t->{HAS_LINK_CODE} = 0; @@ -198,9 +198,9 @@ foreach (qw/ post_constants postamble post_initialize/) { } ############################################################################### -# replace_manpage_separator +# replace_manpage_separator -is ($t->replace_manpage_separator('Foo/Bar'),'Foo::Bar','manpage_separator'); +is ($t->replace_manpage_separator('Foo/Bar'),'Foo::Bar','manpage_separator'); ############################################################################### @@ -208,7 +208,7 @@ $t->init_linker; foreach (qw/ EXPORT_LIST PERL_ARCHIVE PERL_ARCHIVE_AFTER /) { ok( exists $t->{$_}, "$_ was defined" ); - is( $t->{$_}, '', "$_ is empty on Unix"); + is( $t->{$_}, '', "$_ is empty on Unix"); } diff --git a/cpan/ExtUtils-MakeMaker/t/MM_Win32.t b/cpan/ExtUtils-MakeMaker/t/MM_Win32.t index 6d4bf8d288..fee1e5e350 100644 --- a/cpan/ExtUtils-MakeMaker/t/MM_Win32.t +++ b/cpan/ExtUtils-MakeMaker/t/MM_Win32.t @@ -46,18 +46,18 @@ SKIP: { skip( '$ENV{COMSPEC} not set', 2 ) unless $ENV{COMSPEC} =~ m!((?:[a-z]:)?[^|<>]+)!i; my $comspec = $1; - is( $MM->maybe_command( $comspec ), + is( $MM->maybe_command( $comspec ), $comspec, 'COMSPEC is a maybe_command()' ); ( my $comspec2 = $comspec ) =~ s|\..{3}$||; - like( $MM->maybe_command( $comspec2 ), - qr/\Q$comspec/i, + like( $MM->maybe_command( $comspec2 ), + qr/\Q$comspec/i, 'maybe_command() without extension' ); } my $had_pathext = exists $ENV{PATHEXT}; { local $ENV{PATHEXT} = '.exe'; - ok( ! $MM->maybe_command( 'not_a_command.com' ), + ok( ! $MM->maybe_command( 'not_a_command.com' ), 'not a maybe_command()' ); } # Bug in Perl. local $ENV{FOO} won't delete the key afterward. @@ -65,14 +65,14 @@ delete $ENV{PATHEXT} unless $had_pathext; # file_name_is_absolute() [Does not support UNC-paths] { - ok( $MM->file_name_is_absolute( 'C:/' ), + ok( $MM->file_name_is_absolute( 'C:/' ), 'file_name_is_absolute()' ); ok( ! $MM->file_name_is_absolute( 'some/path/' ), 'not file_name_is_absolute()' ); } -# find_perl() +# find_perl() # Should be able to find running perl... $^X is OK on Win32 { my $my_perl = $1 if $^X =~ /(.*)/; # are we in -T or -t? @@ -85,10 +85,10 @@ delete $ENV{PATHEXT} unless $had_pathext; { my @path_eg = qw( c: trick dir/now_OK ); - is( $MM->catdir( @path_eg ), + is( $MM->catdir( @path_eg ), 'C:\\trick\\dir\\now_OK', 'catdir()' ); - is( $MM->catdir( @path_eg ), - File::Spec->catdir( @path_eg ), + is( $MM->catdir( @path_eg ), + File::Spec->catdir( @path_eg ), 'catdir() eq File::Spec->catdir()' ); # catfile() (calls MM_Win32->catdir) @@ -97,8 +97,8 @@ delete $ENV{PATHEXT} unless $had_pathext; is( $MM->catfile( @path_eg ), 'C:\\trick\\dir\\now_OK\\file.ext', 'catfile()' ); - is( $MM->catfile( @path_eg ), - File::Spec->catfile( @path_eg ), + is( $MM->catfile( @path_eg ), + File::Spec->catfile( @path_eg ), 'catfile() eq File::Spec->catfile()' ); } @@ -126,7 +126,7 @@ note "init_others creates expected keys"; { # init_* methods and check the keys in $mm_w32 directly { my $mm_w32 = bless { - NAME => 'TestMM_Win32', + NAME => 'TestMM_Win32', VERSION => '1.00', PM => { 'MM_Win32.pm' => 1 }, MAKE => $Config{make}, @@ -175,7 +175,7 @@ note "init_others creates expected keys"; { # init_linker { - my $libperl = File::Spec->catfile('$(PERL_INC)', + my $libperl = File::Spec->catfile('$(PERL_INC)', $Config{libperl} || 'libperl.a'); my $export = '$(BASEEXT).def'; my $after = ''; @@ -207,19 +207,19 @@ EOSCRIPT skip( "Can't write to temp file: $!", 4 ) unless close SCRIPT; # now start tests: - is( $MM->perl_script( $script_name ), + is( $MM->perl_script( $script_name ), "${script_name}$script_ext", "perl_script ($script_ext)" ); skip( "Can't rename temp file: $!", 3 ) unless rename $script_name, "${script_name}.pl"; $script_ext = '.pl'; - is( $MM->perl_script( $script_name ), + is( $MM->perl_script( $script_name ), "${script_name}$script_ext", "perl_script ($script_ext)" ); skip( "Can't rename temp file: $!", 2 ) unless rename "${script_name}$script_ext", "${script_name}.bat"; $script_ext = '.bat'; - is( $MM->perl_script( $script_name ), + is( $MM->perl_script( $script_name ), "${script_name}$script_ext", "perl_script ($script_ext)" ); skip( "Can't rename temp file: $!", 1 ) @@ -227,7 +227,7 @@ EOSCRIPT $script_ext = '.noscript'; isnt( $MM->perl_script( $script_name ), - "${script_name}$script_ext", + "${script_name}$script_ext", "not a perl_script anymore ($script_ext)" ); is( $MM->perl_script( $script_name ), undef, "perl_script ($script_ext) returns empty" ); diff --git a/cpan/ExtUtils-MakeMaker/t/Mkbootstrap.t b/cpan/ExtUtils-MakeMaker/t/Mkbootstrap.t index 17a3e4550a..db061a4a92 100644 --- a/cpan/ExtUtils-MakeMaker/t/Mkbootstrap.t +++ b/cpan/ExtUtils-MakeMaker/t/Mkbootstrap.t @@ -75,7 +75,7 @@ SKIP: { chmod 0444, 'dasboot.bs'; SKIP: { - skip("cannot write readonly files", 1) if -w 'dasboot.bs'; + skip("cannot write readonly files", 1) if -w 'dasboot.bs'; eval{ Mkbootstrap('dasboot', 1) }; like( $@, qr/Unable to open dasboot\.bs/, 'should die given bad filename' ); @@ -121,7 +121,7 @@ SKIP: { local $DynaLoader::bscode; $DynaLoader::bscode = 'Wall'; $ExtUtils::Mkbootstrap::Verbose = 0; - + # if arguments contain '-l' or '-L' or '-R' print dl_findfile message eval{ Mkbootstrap('dasboot', '-Larry') }; is( $@, '', 'should be able to open a file again'); diff --git a/cpan/ExtUtils-MakeMaker/t/PL_FILES.t b/cpan/ExtUtils-MakeMaker/t/PL_FILES.t index 2d22790692..0b9aed320e 100644 --- a/cpan/ExtUtils-MakeMaker/t/PL_FILES.t +++ b/cpan/ExtUtils-MakeMaker/t/PL_FILES.t @@ -18,7 +18,7 @@ perl_lib(); setup; -END { +END { ok( chdir File::Spec->updir ); ok( teardown ); } diff --git a/cpan/ExtUtils-MakeMaker/t/arch_check.t b/cpan/ExtUtils-MakeMaker/t/arch_check.t index e4b3aef7af..076415bdb3 100644 --- a/cpan/ExtUtils-MakeMaker/t/arch_check.t +++ b/cpan/ExtUtils-MakeMaker/t/arch_check.t @@ -9,7 +9,7 @@ use Test::More 'no_plan'; use Config; use ExtUtils::MakeMaker; -ok( my $stdout = tie *STDOUT, 'TieOut' ); +ok( my $stdout = tie *STDOUT, 'TieOut' ); # Create a normalized MM object to test with my $mm = bless {}, "MM"; @@ -32,11 +32,11 @@ ok $mm->arch_check( ); like $stdout->read, qr{\Q -Your perl and your Config.pm seem to have different ideas about the +Your perl and your Config.pm seem to have different ideas about the architecture they are running on. Perl thinks: [arch1] Config says: [$Config{archname}] -This may or may not cause problems. Please check your installation of perl +This may or may not cause problems. Please check your installation of perl if you have problems building this extension. }; diff --git a/cpan/ExtUtils-MakeMaker/t/basic.t b/cpan/ExtUtils-MakeMaker/t/basic.t index 1410465a9f..cecf0e50b8 100644 --- a/cpan/ExtUtils-MakeMaker/t/basic.t +++ b/cpan/ExtUtils-MakeMaker/t/basic.t @@ -45,7 +45,7 @@ cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag(@mpl_out); my $makefile = makefile_name(); -ok( grep(/^Writing $makefile for Big::Dummy/, +ok( grep(/^Writing $makefile for Big::Dummy/, @mpl_out) == 1, 'Makefile.PL output looks right'); @@ -79,12 +79,12 @@ ok( open(PPD, 'Big-Dummy.ppd'), ' .ppd file generated' ); my $ppd_html; { local $/; $ppd_html = <PPD> } close PPD; -like( $ppd_html, qr{^<SOFTPKG NAME="Big-Dummy" VERSION="0.01">}m, +like( $ppd_html, qr{^<SOFTPKG NAME="Big-Dummy" VERSION="0.01">}m, ' <SOFTPKG>' ); like( $ppd_html, qr{^\s*<ABSTRACT>Try "our" hot dog's, \$andwiche\$ and \$\(ub\)\$!</ABSTRACT>}m, ' <ABSTRACT>'); -like( $ppd_html, +like( $ppd_html, qr{^\s*<AUTHOR>Michael G Schwern <schwern\@pobox.com></AUTHOR>}m, ' <AUTHOR>' ); like( $ppd_html, qr{^\s*<IMPLEMENTATION>}m, ' <IMPLEMENTATION>'); @@ -106,7 +106,7 @@ END { unlink 'Big-Dummy.ppd' } my $test_out = run("$make test"); like( $test_out, qr/All tests successful/, 'make test' ); -is( $?, 0, ' exited normally' ) || +is( $?, 0, ' exited normally' ) || diag $test_out; # Test 'make test TEST_VERBOSE=1' @@ -124,14 +124,14 @@ like( $install_out, qr/^Installing /m ); ok( -r '../dummy-install', ' install dir created' ); my %files = (); -find( sub { +find( sub { # do it case-insensitive for non-case preserving OSs my $file = lc $_; # VMS likes to put dots on the end of things that don't have them. $file =~ s/\.$// if $Is_VMS; - $files{$file} = $File::Find::name; + $files{$file} = $File::Find::name; }, '../dummy-install' ); ok( $files{'dummy.pm'}, ' Dummy.pm installed' ); ok( $files{'liar.pm'}, ' Liar.pm installed' ); @@ -163,14 +163,14 @@ SKIP: { skip 'VMS install targets do not preserve $(DESTDIR)', 10 if $Is_VMS; $install_out = run("$make install PREFIX= DESTDIR=other"); - is( $?, 0, 'install with DESTDIR' ) || + is( $?, 0, 'install with DESTDIR' ) || diag $install_out; like( $install_out, qr/^Installing /m ); ok( -d 'other', ' destdir created' ); %files = (); my $perllocal; - find( sub { + find( sub { $files{$_} = $File::Find::name; }, 'other' ); ok( $files{'Dummy.pm'}, ' Dummy.pm installed' ); @@ -179,7 +179,7 @@ SKIP: { ok( $files{'.packlist'}, ' packlist created' ); ok( $files{'perllocal.pod'},' perllocal.pod created' ); - ok( open(PERLLOCAL, $files{'perllocal.pod'} ) ) || + ok( open(PERLLOCAL, $files{'perllocal.pod'} ) ) || diag("Can't open $files{'perllocal.pod'}: $!"); { local $/; unlike(<PERLLOCAL>, qr/other/, 'DESTDIR should not appear in perllocal'); @@ -187,7 +187,7 @@ SKIP: { close PERLLOCAL; # TODO not available in the min version of Test::Harness we require -# ok( open(PACKLIST, $files{'.packlist'} ) ) || +# ok( open(PACKLIST, $files{'.packlist'} ) ) || # diag("Can't open $files{'.packlist'}: $!"); # { local $/; # local $TODO = 'DESTDIR still in .packlist'; @@ -203,7 +203,7 @@ SKIP: { skip 'VMS install targets do not preserve $(PREFIX)', 9 if $Is_VMS; $install_out = run("$make install PREFIX=elsewhere DESTDIR=other/"); - is( $?, 0, 'install with PREFIX override and DESTDIR' ) || + is( $?, 0, 'install with PREFIX override and DESTDIR' ) || diag $install_out; like( $install_out, qr/^Installing /m ); @@ -394,7 +394,7 @@ note "META file validity"; { cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag(@mpl_out); ok( grep(/^Writing $makefile for Big::Dummy/, @mpl_out) == 1, - 'init_dirscan skipped distdir') || + 'init_dirscan skipped distdir') || diag(@mpl_out); # I know we'll get ignored errors from make here, that's ok. diff --git a/cpan/ExtUtils-MakeMaker/t/cd.t b/cpan/ExtUtils-MakeMaker/t/cd.t index 2563bf01d5..2b30145956 100644 --- a/cpan/ExtUtils-MakeMaker/t/cd.t +++ b/cpan/ExtUtils-MakeMaker/t/cd.t @@ -26,14 +26,14 @@ my @cd_args = ($dir, "command1", "command2"); my @dirs = (File::Spec->updir) x 2; my $expected_updir = File::Spec->catdir(@dirs); - + ::is $mm->cd(@cd_args), qq{cd $dir command1 command2 cd $expected_updir}; } - + { local *make = sub { "dmake" }; @@ -51,7 +51,7 @@ qq{cd $dir && command1 SKIP: { skip("VMS' cd requires vmspath which is only on VMS", 1) unless $Is_VMS; - + use ExtUtils::MM_VMS; is +ExtUtils::MM_VMS->cd(@cd_args), q{startdir = F$Environment("Default") diff --git a/cpan/ExtUtils-MakeMaker/t/fixin.t b/cpan/ExtUtils-MakeMaker/t/fixin.t index ab3a177b38..f8c73e8e36 100644 --- a/cpan/ExtUtils-MakeMaker/t/fixin.t +++ b/cpan/ExtUtils-MakeMaker/t/fixin.t @@ -75,9 +75,9 @@ END my @lines = @_; unlike $lines[$shb_line_num], qr[/foo/bar/perl], "#! replaced"; like $lines[$shb_line_num], qr[ -w\b], "switch retained"; - + # In between might be that "not running under some shell" madness. - + is $lines[-1], "blah blah blah\n", "Program text retained"; } ); diff --git a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm index 8df77d4784..6964e30fdf 100644 --- a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm +++ b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/BFD.pm @@ -119,7 +119,7 @@ sub setup_recurs { return 1; } -sub teardown_recurs { +sub teardown_recurs { foreach my $file (keys %Files) { my $dir = dirname($file); if( -e $dir ) { diff --git a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm index 7446185444..ec0247da86 100644 --- a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm +++ b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/PL_FILES.pm @@ -110,7 +110,7 @@ sub setup { return 1; } -sub teardown { +sub teardown { foreach my $file (keys %Files) { my $dir = dirname($file); if( -e $dir ) { diff --git a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm index c6573a1aad..59ac1517a6 100644 --- a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm +++ b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Problem.pm @@ -48,7 +48,7 @@ sub setup_recurs { return 1; } -sub teardown_recurs { +sub teardown_recurs { foreach my $file (keys %Files) { my $dir = dirname($file); if( -e $dir ) { diff --git a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm index ad1be2f6d1..e7e804f68c 100644 --- a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm +++ b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/Recurs.pm @@ -60,7 +60,7 @@ sub setup_recurs { return 1; } -sub teardown_recurs { +sub teardown_recurs { foreach my $file (keys %Files) { my $dir = dirname($file); if( -e $dir ) { diff --git a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/XS.pm b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/XS.pm index 195fd56feb..2e944d1bd7 100644 --- a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/XS.pm +++ b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Setup/XS.pm @@ -51,7 +51,7 @@ is_even(input) CODE: RETVAL = (input % 2 == 0); OUTPUT: - RETVAL + RETVAL END 'XS-Test/t/is_even.t' => <<'END', @@ -84,7 +84,7 @@ sub setup_xs { return 1; } -sub teardown_xs { +sub teardown_xs { foreach my $file (keys %Files) { my $dir = dirname($file); if( -e $dir ) { diff --git a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm index 9a6ab60e35..9f7e3f1be5 100644 --- a/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm +++ b/cpan/ExtUtils-MakeMaker/t/lib/MakeMaker/Test/Utils.pm @@ -128,7 +128,7 @@ sub which_perl { # When building in the core, *don't* go off and find # another perl - die "Can't find a perl to use (\$^X=$^X), (\$perlpath=$perlpath)" + die "Can't find a perl to use (\$^X=$^X), (\$perlpath=$perlpath)" if $ENV{PERL_CORE}; foreach my $path (File::Spec->path) { @@ -162,7 +162,7 @@ sub perl_lib { unshift @INC, $lib; } -END { +END { if( $had5lib ) { $ENV{PERL5LIB} = $old5lib; } @@ -183,7 +183,7 @@ should generate. sub makefile_name { return $Is_VMS ? 'Descrip.MMS' : 'Makefile'; -} +} =item B<makefile_backup> @@ -236,7 +236,7 @@ sub make_run { Returns the command necessary to run $make on the given $target using the given %macros. - my $make_test_verbose = make_macro(make_run(), 'test', + my $make_test_verbose = make_macro(make_run(), 'test', TEST_VERBOSE => 1); This is important because VMS's make utilities have a completely @@ -300,7 +300,7 @@ sub run { use ExtUtils::MM; - # Unix, modern Windows and OS/2 from 5.005_54 up can handle 2>&1 + # Unix, modern Windows and OS/2 from 5.005_54 up can handle 2>&1 # This makes our failure diagnostics nicer to read. if( MM->os_flavor_is('Unix') or (MM->os_flavor_is('Win32') and !MM->os_flavor_is('Win9x')) or @@ -336,7 +336,7 @@ sub run_ok { =item B<setup_mm_test_root> -Creates a rooted logical to avoid the 8-level limit on older VMS systems. +Creates a rooted logical to avoid the 8-level limit on older VMS systems. No action taken on non-VMS systems. =cut @@ -347,7 +347,7 @@ sub setup_mm_test_root { # imposed by RMS. We get around this with a rooted logical, but we # can't create logical names with attributes in Perl, so we do it # in a DCL subprocess and put it in the job table so the parent sees it. - open( MMTMP, '>mmtesttmp.com' ) || + open( MMTMP, '>mmtesttmp.com' ) || die "Error creating command file; $!"; print MMTMP <<'COMMAND'; $ MM_TEST_ROOT = F$PARSE("SYS$DISK:[--]",,,,"NO_CONCEAL")-".][000000"-"]["-"].;"+".]" diff --git a/cpan/ExtUtils-MakeMaker/t/maketext_filter.t b/cpan/ExtUtils-MakeMaker/t/maketext_filter.t index 404a91c94f..ccb6a77998 100644 --- a/cpan/ExtUtils-MakeMaker/t/maketext_filter.t +++ b/cpan/ExtUtils-MakeMaker/t/maketext_filter.t @@ -12,7 +12,7 @@ use ExtUtils::MM_VMS; sub test_filter { my($text, $vms_text) = @_; - + local $Test::Builder::Level = $Test::Builder::Level + 1; is( ExtUtils::MM_Any->maketext_filter($text), $text, 'default filter' ); is( ExtUtils::MM_VMS->maketext_filter($text), $vms_text, 'VMS filter' ); diff --git a/cpan/ExtUtils-MakeMaker/t/metafile_data.t b/cpan/ExtUtils-MakeMaker/t/metafile_data.t index 1fb8d10b9d..94ce0948b0 100644 --- a/cpan/ExtUtils-MakeMaker/t/metafile_data.t +++ b/cpan/ExtUtils-MakeMaker/t/metafile_data.t @@ -83,7 +83,7 @@ my $new_mm = sub { generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION", 'meta-spec' => { - url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', + url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', version => 1.4 }, }; @@ -111,7 +111,7 @@ my $new_mm = sub { generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION", 'meta-spec' => { - url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', + url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', version => 1.4 }, }, 'rt.cpan.org 39348'; @@ -171,7 +171,7 @@ my $new_mm = sub { generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION", 'meta-spec' => { - url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', + url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', version => 1.4 }, @@ -218,7 +218,7 @@ my $new_mm = sub { generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION", 'meta-spec' => { - url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', + url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', version => 1.4 }, }; @@ -266,7 +266,7 @@ my $new_mm = sub { generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION", 'meta-spec' => { - url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', + url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', version => 1.4 }, }; @@ -307,7 +307,7 @@ my $new_mm = sub { generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION", 'meta-spec' => { - url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', + url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', version => 1.4 }, },'CONFIGURE_REQUIRES'; @@ -348,7 +348,7 @@ my $new_mm = sub { generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION", 'meta-spec' => { - url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', + url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', version => 1.4 }, },'CONFIGURE_REQUIRES'; @@ -389,7 +389,7 @@ my $new_mm = sub { generated_by => "ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION", 'meta-spec' => { - url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', + url => 'http://module-build.sourceforge.net/META-spec-v1.4.html', version => 1.4 }, },'META.yml data (META_ADD wins)'; diff --git a/cpan/ExtUtils-MakeMaker/t/metafile_file.t b/cpan/ExtUtils-MakeMaker/t/metafile_file.t index e4e98dc4a0..3085c22cc5 100644 --- a/cpan/ExtUtils-MakeMaker/t/metafile_file.t +++ b/cpan/ExtUtils-MakeMaker/t/metafile_file.t @@ -103,7 +103,7 @@ YAML { - my @meta = ( + my @meta = ( name => 'My-Module', version => '0.1', version_from => 'lib/My/Module.pm', @@ -145,7 +145,7 @@ YAML } { - my @meta = ( + my @meta = ( name => 'My-Module', version => '0.1', version_from => 'lib/My/Module.pm', @@ -196,7 +196,7 @@ YAML } { - my @meta = ( + my @meta = ( name => 'My-Module', version => '0.1', version_from => 'lib/My/Module.pm', @@ -267,7 +267,7 @@ YAML SKIP: { - # Load() behaves diffrently in versions prior to 1.06 + # Load() behaves diffrently in versions prior to 1.06 skip "Need YAML::Tiny to test if it can load META.yml", 2 unless eval { require YAML::Tiny } and $YAML::Tiny::VERSION >= 1.06; @@ -294,7 +294,7 @@ YAML my @meta = ( k => \*STDOUT ); eval { $mm->metafile_file(@meta) }; - like($@, qr/^only nested hashes, arrays and objects are supported/, + like($@, qr/^only nested hashes, arrays and objects are supported/, "we don't like but hash/array refs"); } @@ -302,7 +302,7 @@ YAML my @meta = ( k => [ [] ] ); eval { $mm->metafile_file(@meta) }; - like($@, qr/^only nested arrays of non-refs are supported/, + like($@, qr/^only nested arrays of non-refs are supported/, "we also don't like but array of strings"); } diff --git a/cpan/ExtUtils-MakeMaker/t/miniperl.t b/cpan/ExtUtils-MakeMaker/t/miniperl.t index 9a4def2028..d3177bebfe 100644 --- a/cpan/ExtUtils-MakeMaker/t/miniperl.t +++ b/cpan/ExtUtils-MakeMaker/t/miniperl.t @@ -12,7 +12,7 @@ use Test::More; BEGIN { plan skip_all => "miniperl test only necessary for the perl core" if !$ENV{PERL_CORE}; - + plan "no_plan"; } diff --git a/cpan/ExtUtils-MakeMaker/t/parse_version.t b/cpan/ExtUtils-MakeMaker/t/parse_version.t index 9a249a4fdc..e0d181b3cd 100644 --- a/cpan/ExtUtils-MakeMaker/t/parse_version.t +++ b/cpan/ExtUtils-MakeMaker/t/parse_version.t @@ -11,6 +11,7 @@ use File::Temp qw[tempfile]; my $Has_Version = eval 'require version; "version"->import; 1'; +# "undef" - means we expect "undef", undef - eval should be never called for this string my %versions = (q[$VERSION = '1.00'] => '1.00', q[*VERSION = \'1.01'] => '1.01', q[($VERSION) = q$Revision: 32208 $ =~ /(\d+)/g;] => 32208, @@ -20,30 +21,35 @@ my %versions = (q[$VERSION = '1.00'] => '1.00', '$VERSION = 0.0' => 0.0, '$VERSION = -1.0' => -1.0, '$VERSION = undef' => 'undef', - '$wibble = 1.0' => 'undef', + '$wibble = 1.0' => undef, q[my $VERSION = '1.01'] => 'undef', q[local $VERISON = '1.02'] => 'undef', q[local $FOO::VERSION = '1.30'] => 'undef', q[if( $Foo::VERSION >= 3.00 ) {]=> 'undef', q[our $VERSION = '1.23';] => '1.23', + q[$CGI::VERSION='3.63'] => '3.63', + q[$VERSION = "1.627"; # ==> ALSO update the version in the pod text below!] => '1.627', - '$Something::VERSION == 1.0' => 'undef', - '$Something::VERSION <= 1.0' => 'undef', - '$Something::VERSION >= 1.0' => 'undef', - '$Something::VERSION != 1.0' => 'undef', + '$Something::VERSION == 1.0' => undef, + '$Something::VERSION <= 1.0' => undef, + '$Something::VERSION >= 1.0' => undef, + '$Something::VERSION != 1.0' => undef, + 'my $meta_coder = ($JSON::XS::VERSION >= 1.4) ?' => undef, qq[\$Something::VERSION == 1.0\n\$VERSION = 2.3\n] => '2.3', qq[\$Something::VERSION == 1.0\n\$VERSION = 2.3\n\$VERSION = 4.5\n] => '2.3', '$VERSION = sprintf("%d.%03d", q$Revision: 3.74 $ =~ /(\d+)\.(\d+)/);' => '3.074', '$VERSION = substr(q$Revision: 2.8 $, 10) + 2 . "";' => '4.8', - 'elsif ( $Something::VERSION >= 1.99 )' => 'undef', + q[our $VERSION = do { my @r = ( q$Revision: 2.7 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };] => '2.07', # Fucking seriously? + 'elsif ( $Something::VERSION >= 1.99 )' => undef, ); if( $Has_Version ) { $versions{q[use version; $VERSION = qv("1.2.3");]} = qv("1.2.3"); $versions{q[$VERSION = qv("1.2.3")]} = qv("1.2.3"); + $versions{q[$VERSION = v1.2.3]} = 'v1.2.3'; } if( $] >= 5.011001 ) { @@ -74,14 +80,24 @@ our $VERSION = 2.34; END } -plan tests => (3 * keys %versions) + 4; +plan tests => (3 * keys %versions) + 4 + grep { !defined} (values %versions); for my $code ( sort keys %versions ) { my $expect = $versions{$code}; (my $label = $code) =~ s/\n/\\n/g; my $warnings = ""; local $SIG{__WARN__} = sub { $warnings .= "@_\n"; }; - is( parse_version_string($code), $expect, $label ); + if (defined $expect) { + is( parse_version_string($code), $expect, $label ); + } else { + my $is_called = 0; + no warnings qw[redefine once]; + local *MM::get_version = sub { + $is_called = 1; + }; + ok !$is_called; + is( parse_version_string($code), 'undef', $label ); + } is($warnings, '', "$label does not cause warnings"); } diff --git a/cpan/ExtUtils-MakeMaker/t/postamble.t b/cpan/ExtUtils-MakeMaker/t/postamble.t index c83a1c8910..711e979e52 100644 --- a/cpan/ExtUtils-MakeMaker/t/postamble.t +++ b/cpan/ExtUtils-MakeMaker/t/postamble.t @@ -49,7 +49,7 @@ ok( chdir 'Big-Dummy', q{chdir'd to Big-Dummy} ) || sub MY::postamble { my($self, %extra) = @_; - is_deeply( \%extra, { FOO => 1, BAR => 'fugawazads' }, + is_deeply( \%extra, { FOO => 1, BAR => 'fugawazads' }, 'postamble args passed' ); return <<OUT; @@ -60,7 +60,7 @@ OUT ok( open(MAKEFILE, $Makefile) ) or diag "Can't open $Makefile: $!"; -{ local $/; +{ local $/; like( <MAKEFILE>, qr/^\# This makes sure the postamble gets written\n/m, 'postamble added to the Makefile' ); } diff --git a/cpan/ExtUtils-MakeMaker/t/prereq.t b/cpan/ExtUtils-MakeMaker/t/prereq.t index 07bbaf02d3..3149193186 100644 --- a/cpan/ExtUtils-MakeMaker/t/prereq.t +++ b/cpan/ExtUtils-MakeMaker/t/prereq.t @@ -53,7 +53,7 @@ ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) || strict => 99999 } ); - is $warnings, + is $warnings, sprintf("Warning: prerequisite strict 99999 not found. We have %s.\n", $strict::VERSION); @@ -64,7 +64,7 @@ ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) || "I::Do::Not::Exist" => 0, } ); - is $warnings, + is $warnings, "Warning: prerequisite I::Do::Not::Exist 0 not found.\n"; @@ -89,11 +89,11 @@ ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) || "strict" => 99999, } ); - is $warnings, + is $warnings, "Warning: prerequisite I::Do::Not::Exist 0 not found.\n". sprintf("Warning: prerequisite strict 99999 not found. We have %s.\n", $strict::VERSION); - + $warnings = ''; eval { WriteMakefile( @@ -106,7 +106,7 @@ ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) || PREREQ_FATAL => 1, ); }; - + is $warnings, ''; is $@, <<'END', "PREREQ_FATAL"; MakeMaker FATAL: prerequisites not found. @@ -131,7 +131,7 @@ END PREREQ_FATAL => 1, ); }; - + is $warnings, ''; is $@, <<'END', "PREREQ_FATAL happens before CONFIGURE"; MakeMaker FATAL: prerequisites not found. diff --git a/cpan/ExtUtils-MakeMaker/t/prereq_print.t b/cpan/ExtUtils-MakeMaker/t/prereq_print.t index e93a2fd8b9..9170aa0e4e 100644 --- a/cpan/ExtUtils-MakeMaker/t/prereq_print.t +++ b/cpan/ExtUtils-MakeMaker/t/prereq_print.t @@ -58,7 +58,7 @@ is( $?, 0, ' exited normally' ); $prereq_out = run(qq{$Perl Makefile.PL "PRINT_PREREQ=1"}); ok( !-r $Makefile, "PRINT_PREREQ produces no $Makefile" ); is( $?, 0, ' exited normally' ); -::like( $prereq_out, qr/^perl\(strict\) \s* >= \s* 0 \s*$/x, +::like( $prereq_out, qr/^perl\(strict\) \s* >= \s* 0 \s*$/x, 'prereqs dumped' ); diff --git a/cpan/ExtUtils-MakeMaker/t/problems.t b/cpan/ExtUtils-MakeMaker/t/problems.t index 8956539de5..3aeba706ef 100644 --- a/cpan/ExtUtils-MakeMaker/t/problems.t +++ b/cpan/ExtUtils-MakeMaker/t/problems.t @@ -33,7 +33,7 @@ ok( chdir 'Problem-Module', "chdir'd to Problem-Module" ) || eval { $MM->eval_in_subdirs; }; is( $stdout->read, qq{\@INC has .\n}, 'cwd in @INC' ); - like( $@, + like( $@, qr{^ERROR from evaluation of .*subdir.*Makefile.PL: YYYAaaaakkk}, 'Makefile.PL death in subdir warns' ); diff --git a/cpan/ExtUtils-MakeMaker/t/prompt.t b/cpan/ExtUtils-MakeMaker/t/prompt.t index d428aa835e..d6f343eb6a 100644 --- a/cpan/ExtUtils-MakeMaker/t/prompt.t +++ b/cpan/ExtUtils-MakeMaker/t/prompt.t @@ -19,7 +19,7 @@ like( $@, qr/^Not enough arguments for ExtUtils::MakeMaker::prompt/, eval { prompt(undef); }; -like( $@, qr/^prompt function called without an argument/, +like( $@, qr/^prompt function called without an argument/, 'undef message' ); my $stdout = tie *STDOUT, 'TieOut' or die; diff --git a/cpan/ExtUtils-MakeMaker/t/recurs.t b/cpan/ExtUtils-MakeMaker/t/recurs.t index 746a09a219..b7c561bc9c 100644 --- a/cpan/ExtUtils-MakeMaker/t/recurs.t +++ b/cpan/ExtUtils-MakeMaker/t/recurs.t @@ -29,7 +29,7 @@ my $Touch_Time = calibrate_mtime(); $| = 1; ok( setup_recurs(), 'setup' ); -END { +END { ok( chdir File::Spec->updir ); ok( teardown_recurs(), 'teardown' ); } @@ -100,9 +100,9 @@ ok( -e $submakefile, 'sub Makefile written' ); my $inst_script = File::Spec->catdir(File::Spec->updir, 'cgi'); ok( open(MAKEFILE, $submakefile) ) || diag("Can't open $submakefile: $!"); -{ local $/; - like( <MAKEFILE>, qr/^\s*INST_SCRIPT\s*=\s*\Q$inst_script\E/m, - 'prepend .. not stomping WriteMakefile args' ) +{ local $/; + like( <MAKEFILE>, qr/^\s*INST_SCRIPT\s*=\s*\Q$inst_script\E/m, + 'prepend .. not stomping WriteMakefile args' ) } close MAKEFILE; diff --git a/cpan/ExtUtils-MakeMaker/t/revision.t b/cpan/ExtUtils-MakeMaker/t/revision.t index ebfea1a296..97e19c7fbb 100644 --- a/cpan/ExtUtils-MakeMaker/t/revision.t +++ b/cpan/ExtUtils-MakeMaker/t/revision.t @@ -6,8 +6,8 @@ BEGIN { use Test::More tests => 4; -BEGIN { - use_ok 'ExtUtils::MakeMaker'; +BEGIN { + use_ok 'ExtUtils::MakeMaker'; use_ok 'ExtUtils::MM_VMS'; } diff --git a/cpan/ExtUtils-MakeMaker/t/several_authors.t b/cpan/ExtUtils-MakeMaker/t/several_authors.t index bf6cdcb906..eba35e13a6 100644 --- a/cpan/ExtUtils-MakeMaker/t/several_authors.t +++ b/cpan/ExtUtils-MakeMaker/t/several_authors.t @@ -68,7 +68,7 @@ note "argument verification via CONFIGURE"; { eval { WriteMakefile( NAME => 'Multiple::Authors', - CONFIGURE => sub { + CONFIGURE => sub { return {AUTHOR => 'John Doe <jd@example.com>',}; }, ); diff --git a/cpan/ExtUtils-MakeMaker/t/testlib.t b/cpan/ExtUtils-MakeMaker/t/testlib.t index b2c8ddbadf..90691ae2e7 100644 --- a/cpan/ExtUtils-MakeMaker/t/testlib.t +++ b/cpan/ExtUtils-MakeMaker/t/testlib.t @@ -8,7 +8,7 @@ chdir 't'; use Test::More tests => 5; -BEGIN { +BEGIN { # non-core tests will have blib in their path. We remove it # and just use the one in lib/. unless( $ENV{PERL_CORE} ) { diff --git a/cpan/ExtUtils-MakeMaker/t/writemakefile_args.t b/cpan/ExtUtils-MakeMaker/t/writemakefile_args.t index daa8255fbe..421a311c18 100644 --- a/cpan/ExtUtils-MakeMaker/t/writemakefile_args.t +++ b/cpan/ExtUtils-MakeMaker/t/writemakefile_args.t @@ -225,7 +225,7 @@ VERIFY }; is( $warnings, '' ); is_deeply( $mm->{AUTHOR}, ["test"] ); - + # AUTHOR / array $warnings = ''; @@ -238,5 +238,5 @@ VERIFY }; is( $warnings, '' ); is_deeply( $mm->{AUTHOR}, ["test1","test2"] ); - + } diff --git a/cpan/ExtUtils-MakeMaker/t/xs.t b/cpan/ExtUtils-MakeMaker/t/xs.t index 5cb17c2fed..3f9a4df4ba 100644 --- a/cpan/ExtUtils-MakeMaker/t/xs.t +++ b/cpan/ExtUtils-MakeMaker/t/xs.t @@ -50,9 +50,9 @@ cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || my $make = make_run(); my $make_out = run("$make"); -is( $?, 0, ' make exited normally' ) || +is( $?, 0, ' make exited normally' ) || diag $make_out; my $test_out = run("$make test"); -is( $?, 0, ' make test exited normally' ) || +is( $?, 0, ' make test exited normally' ) || diag $test_out; |