In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/699ed31ec604580b23b25fc7a7fb44b59c92cbc6?hp=f97a82b4769f9dc8deb2cc1bb6e3dfa3c52e3caa>
- Log ----------------------------------------------------------------- commit 699ed31ec604580b23b25fc7a7fb44b59c92cbc6 Author: Craig A. Berry <craigbe...@mac.com> Date: Fri Oct 31 13:26:32 2014 -0500 Bump XSLoader version after 4821216b2814. M dist/XSLoader/XSLoader_pm.PL commit 8f3394c072b773a40969e72c80754ede5a4bf690 Author: Craig A. Berry <craigbe...@mac.com> Date: Fri Oct 31 13:23:40 2014 -0500 Bump POSIX version following a7ea4c68ecf. M ext/POSIX/lib/POSIX.pm commit e6c99c9d087d458a58dbd5dc722caabcc2c52b36 Author: Craig A. Berry <craigbe...@mac.com> Date: Fri Oct 31 09:46:43 2014 -0500 Replace Test::More with t/test.pl in DynaLoader.t. Test::More has dependencies on dynamically loaded modules and thus isn't appropriate for running a basic test of whether dynamic loading is working. Plus it provides no features we're using that aren't also in t/test.pl. (Just had to make the second argument to like() a regex instead of a string.) M ext/DynaLoader/t/DynaLoader.t ----------------------------------------------------------------------- Summary of changes: dist/XSLoader/XSLoader_pm.PL | 2 +- ext/DynaLoader/t/DynaLoader.t | 44 +++++++++++++++++++------------------------ ext/POSIX/lib/POSIX.pm | 2 +- 3 files changed, 21 insertions(+), 27 deletions(-) diff --git a/dist/XSLoader/XSLoader_pm.PL b/dist/XSLoader/XSLoader_pm.PL index 7a8a638..578bd99 100644 --- a/dist/XSLoader/XSLoader_pm.PL +++ b/dist/XSLoader/XSLoader_pm.PL @@ -10,7 +10,7 @@ print OUT <<'EOT'; package XSLoader; -$VERSION = "0.18"; +$VERSION = "0.19"; #use strict; diff --git a/ext/DynaLoader/t/DynaLoader.t b/ext/DynaLoader/t/DynaLoader.t index f89134b..3ac8d08 100644 --- a/ext/DynaLoader/t/DynaLoader.t +++ b/ext/DynaLoader/t/DynaLoader.t @@ -2,8 +2,9 @@ use strict; use Config; -use Test::More; -my (%modules, %no_unload); +require '../../t/test.pl'; + +my %modules; my $db_file; BEGIN { @@ -24,14 +25,9 @@ BEGIN { $db_file => q| ::is( ref $db_file->can('TIEHASH'), 'CODE' ) |, # 5.0 'Socket' => q| ::is( ref Socket->can('inet_aton'),'CODE' ) |, # 5.0 'Time::HiRes' => q| ::is( ref Time::HiRes->can('usleep'),'CODE' ) |, # 5.7.3 - 'Encode' => q| ::is( ref Encode->can('decode'),'CODE' ) |, # Test::Builder loads this. ); -# These modules must not be unloaded since they are needed by Test::Builder -%no_unload = ( - 'Encode' => 1, - 'List::Util' => 1, -); +plan (26 + keys(%modules) * 3); # Try to load the module use_ok( 'DynaLoader' ); @@ -52,7 +48,7 @@ if ($Config{usedl}) { can_ok( 'DynaLoader' => 'dl_load_file' ); # defined in XS section can_ok( 'DynaLoader' => 'dl_undef_symbols' ); # defined in XS section SKIP: { - skip "unloading unsupported on $^O", 1 if ($old_darwin || $^O eq 'VMS'); + skip( "unloading unsupported on $^O", 1 ) if ($old_darwin || $^O eq 'VMS'); can_ok( 'DynaLoader' => 'dl_unload_file' ); # defined in XS section } } else { @@ -71,23 +67,23 @@ can_ok( 'DynaLoader' => 'dl_find_symbol_anywhere' ); # Check error messages # .. for bootstrap() eval { DynaLoader::bootstrap() }; -like( $@, q{/^Usage: DynaLoader::bootstrap\(module\)/}, +like( $@, qr/^Usage: DynaLoader::bootstrap\(module\)/, "calling DynaLoader::bootstrap() with no argument" ); eval { package egg_bacon_sausage_and_spam; DynaLoader::bootstrap("egg_bacon_sausage_and_spam") }; if ($Config{usedl}) { - like( $@, q{/^Can't locate loadable object for module egg_bacon_sausage_and_spam/}, + like( $@, qr/^Can't locate loadable object for module egg_bacon_sausage_and_spam/, "calling DynaLoader::bootstrap() with a package without binary object" ); } else { - like( $@, q{/^Can't load module egg_bacon_sausage_and_spam/}, + like( $@, qr/^Can't load module egg_bacon_sausage_and_spam/, "calling DynaLoader::bootstrap() with a package without binary object" ); } # .. for dl_load_file() SKIP: { - skip "no dl_load_file with dl_none.xs", 2 unless $Config{usedl}; + skip( "no dl_load_file with dl_none.xs", 2 ) unless $Config{usedl}; eval { DynaLoader::dl_load_file() }; - like( $@, q{/^Usage: DynaLoader::dl_load_file\(filename, flags=0\)/}, + like( $@, qr/^Usage: DynaLoader::dl_load_file\(filename, flags=0\)/, "calling DynaLoader::dl_load_file() with no argument" ); eval { no warnings 'uninitialized'; DynaLoader::dl_load_file(undef) }; @@ -98,7 +94,7 @@ my ($dlhandle, $dlerr); eval { $dlhandle = DynaLoader::dl_load_file("egg_bacon_sausage_and_spam") }; $dlerr = DynaLoader::dl_error(); SKIP: { - skip "dl_load_file() does not attempt to load file on VMS (and thus does not fail) when \@dl_require_symbols is empty", 1 if $^O eq 'VMS'; + skip( "dl_load_file() does not attempt to load file on VMS (and thus does not fail) when \@dl_require_symbols is empty", 1 ) if $^O eq 'VMS'; ok( !$dlhandle, "calling DynaLoader::dl_load_file() without an existing library should fail" ); } ok( defined $dlerr, "dl_error() returning an error message: '$dlerr'" ); @@ -115,13 +111,13 @@ SKIP: { # Some platforms are known to not have a "libc" # (not at least by that name) that the dl_findfile() # could find. - skip "dl_findfile test not appropriate on $^O", 1 + skip( "dl_findfile test not appropriate on $^O", 1 ) if $^O =~ /(win32|vms|openbsd|bitrig|cygwin|vos)/i; # Play safe and only try this test if this system # looks pretty much Unix-like. - skip "dl_findfile test not appropriate on $^O", 1 + skip( "dl_findfile test not appropriate on $^O", 1 ) unless -d '/usr' && -f '/bin/ls'; - skip "dl_findfile test not always appropriate when cross-compiling", 1 + skip( "dl_findfile test not always appropriate when cross-compiling", 1 ) if $Config{usecrosscompile}; cmp_ok( scalar @files, '>=', 1, "array should contain one result result or more: libc => (@files)" ); } @@ -134,7 +130,7 @@ for my $module (sort keys %modules) { SKIP: { if ($extensions !~ /\b$module\b/) { delete($modules{$module}); - skip "$module not available", 3; + skip( "$module not available", 3); } eval "use $module"; is( $@, '', "loading $module" ); @@ -148,14 +144,13 @@ is( scalar @DynaLoader::dl_modules, scalar keys %modules, "checking number of it my @loaded_modules = @DynaLoader::dl_modules; for my $libref (reverse @DynaLoader::dl_librefs) { TODO: { - todo_skip "Can't safely unload with -DPERL_GLOBAL_STRUCT_PRIVATE (RT #119409)", 2 + todo_skip( "Can't safely unload with -DPERL_GLOBAL_STRUCT_PRIVATE (RT #119409)", 2 ) if $Config{ccflags} =~ /(?:^|\s)-DPERL_GLOBAL_STRUCT_PRIVATE\b/; SKIP: { - skip "unloading unsupported on $^O", 2 + skip( "unloading unsupported on $^O", 2 ) if ($old_darwin || $^O eq 'VMS'); my $module = pop @loaded_modules; - next if $no_unload{$module}; - skip "File::Glob sets PL_opfreehook", 2 if $module eq 'File::Glob'; + skip( "File::Glob sets PL_opfreehook", 2 ) if $module eq 'File::Glob'; my $r = eval { DynaLoader::dl_unload_file($libref) }; is( $@, '', "calling dl_unload_file() for $module" ); is( $r, 1, " - unload was successful" ); @@ -164,7 +159,7 @@ for my $libref (reverse @DynaLoader::dl_librefs) { } SKIP: { - skip "mod2fname not defined on this platform", 4 + skip( "mod2fname not defined on this platform", 4 ) unless defined &DynaLoader::mod2fname && $Config{d_libname_unique}; is( @@ -192,4 +187,3 @@ SKIP: { ); } -done_testing; diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm index 4770a54..2c1d6d3 100644 --- a/ext/POSIX/lib/POSIX.pm +++ b/ext/POSIX/lib/POSIX.pm @@ -4,7 +4,7 @@ use warnings; our ($AUTOLOAD, %SIGRT); -our $VERSION = '1.45'; +our $VERSION = '1.46'; require XSLoader; -- Perl5 Master Repository