In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/5069e5776432678375e6753013c91c25610dd9dc?hp=27d3197f2b90b3534ea74a96fc7e37200baeb9b7>
- Log ----------------------------------------------------------------- commit 5069e5776432678375e6753013c91c25610dd9dc Author: Chris 'BinGOs' Williams <ch...@bingosnet.co.uk> Date: Tue Dec 12 11:39:20 2017 +0000 Update Filter::Util::Call to CPAN version 1.58 [DELTA] 1.58 2017-11-15 rurban ---- * Drop 5.005 support * Switch from DynaLoader to XSLoader [atoomic #5] * Replace use vars by our. [atoomic #5] * Lazy load Carp only when required. [atoomic #5] * Minor test improvements * Fix v5.8 cast warnings commit 8bdc12c655eff532a15400c4aec1d1b308f4bf15 Author: Chris 'BinGOs' Williams <ch...@bingosnet.co.uk> Date: Tue Dec 12 11:32:35 2017 +0000 Update B-Debug to CPAN version 1.26 [DELTA] 1.26 2017-12-03 rurban * Avoid too many -I when calling subprocess (sprout, RT#123816) commit 2bcf6e587843f3a15f0d6b1dd5c598912d1dab7f Author: Chris 'BinGOs' Williams <ch...@bingosnet.co.uk> Date: Tue Dec 12 11:29:29 2017 +0000 Update experimental to CPAN version 0.019 [DELTA] 0.019 2017-12-03 18:40:19+01:00 Europe/Amsterdam - Rerelease without NYTProf files ----------------------------------------------------------------------- Summary of changes: Porting/Maintainers.pl | 6 +- cpan/B-Debug/Debug.pm | 2 +- cpan/B-Debug/t/debug.t | 17 +- cpan/Filter-Util-Call/Call.pm | 23 +-- cpan/Filter-Util-Call/Call.xs | 2 +- cpan/Filter-Util-Call/t/call.t | 323 +++++++++++++++++++--------------- cpan/experimental/lib/experimental.pm | 4 +- 7 files changed, 211 insertions(+), 166 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index c1f817d00f..403b3f7598 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -173,7 +173,7 @@ use File::Glob qw(:case); }, 'B::Debug' => { - 'DISTRIBUTION' => 'RURBAN/B-Debug-1.25.tar.gz', + 'DISTRIBUTION' => 'RURBAN/B-Debug-1.26.tar.gz', 'FILES' => q[cpan/B-Debug], 'EXCLUDED' => ['t/pod.t'], 'DEPRECATED' => '5.027003', @@ -407,7 +407,7 @@ use File::Glob qw(:case); }, 'experimental' => { - 'DISTRIBUTION' => 'LEONT/experimental-0.018.tar.gz', + 'DISTRIBUTION' => 'LEONT/experimental-0.019.tar.gz', 'FILES' => q[cpan/experimental], 'EXCLUDED' => [ qr{^xt/}, @@ -524,7 +524,7 @@ use File::Glob qw(:case); }, 'Filter::Util::Call' => { - 'DISTRIBUTION' => 'RURBAN/Filter-1.57.tar.gz', + 'DISTRIBUTION' => 'RURBAN/Filter-1.58.tar.gz', 'FILES' => q[cpan/Filter-Util-Call pod/perlfilter.pod ], diff --git a/cpan/B-Debug/Debug.pm b/cpan/B-Debug/Debug.pm index b49041f864..d121cbbcfa 100644 --- a/cpan/B-Debug/Debug.pm +++ b/cpan/B-Debug/Debug.pm @@ -1,6 +1,6 @@ package B::Debug; -our $VERSION = '1.25'; +our $VERSION = '1.26'; BEGIN { if ($] >= 5.027001) { require deprecate; import deprecate; } } use strict; diff --git a/cpan/B-Debug/t/debug.t b/cpan/B-Debug/t/debug.t index 0f60b95a5b..c362d7456d 100644 --- a/cpan/B-Debug/t/debug.t +++ b/cpan/B-Debug/t/debug.t @@ -32,17 +32,18 @@ use File::Spec; my $a; my $X = $^X =~ m/\s/ ? qq{"$^X"} : $^X; -my $path = join " ", map { qq["-I$_"] } (File::Spec->catfile("blib","lib"), @INC); +local $ENV{PERL5LIB} = + join $Config{path_sep}, File::Spec->catfile("blib","lib"), @INC; my $redir = $^O =~ /VMS|MSWin32|MacOS/ ? "" : "2>&1"; -$a = `$X $path "-MO=Debug" -e 1 $redir`; +$a = `$X "-MO=Debug" -e 1 $redir`; like($a, qr/\bLISTOP\b.*\bOP\b.*\bCOP\b.*\bOP\b/s); -$a = `$X $path "-MO=Terse" -e 1 $redir`; +$a = `$X "-MO=Terse" -e 1 $redir`; like($a, qr/\bLISTOP\b.*leave.*\n OP\b.*enter.*\n COP\b.*nextstate.*\n OP\b.*null/s); -$a = `$X $path "-MO=Terse" -ane "s/foo/bar/" $redir`; +$a = `$X "-MO=Terse" -ane "s/foo/bar/" $redir`; $a =~ s/\(0x[^)]+\)//g; $a =~ s/\[[^\]]+\]//g; $a =~ s/-e syntax OK//; @@ -81,14 +82,14 @@ is($a, $b); like(B::Debug::_printop(B::main_root), qr/LISTOP\s+\[OP_LEAVE\]/); like(B::Debug::_printop(B::main_start), qr/OP\s+\[OP_ENTER\]/); -$a = `$X $path "-MO=Debug" -e "B::main_root->debug" $redir`; +$a = `$X "-MO=Debug" -e "B::main_root->debug" $redir`; like($a, qr/op_next\s+0x0/m); -$a = `$X $path "-MO=Debug" -e "B::main_start->debug" $redir`; +$a = `$X "-MO=Debug" -e "B::main_start->debug" $redir`; like($a, qr/\[OP_ENTER\]/m); # pass missing FETCHSIZE, fixed with 1.06 my $e = q(BEGIN{tie @a, __PACKAGE__;sub TIEARRAY {bless{}} sub FETCH{1}};print $a[1]); -$a = `$X $path "-MO=Debug" -e"$e" $redir`; +$a = `$X "-MO=Debug" -e"$e" $redir`; unlike($a, qr/locate object method "FETCHSIZE"/m); # NV assertion with CV, fixed with 1.13 @@ -96,7 +97,7 @@ my $tmp = "tmp.pl"; open TMP, ">", $tmp; print TMP 'my $p=1;$g=2;sub p($){my $i=1;$i+1};print p(0)+$g;'; close TMP; -$a = `$X $path "-MO=Debug" $tmp $redir`; +$a = `$X "-MO=Debug" $tmp $redir`; ok(! $?); unlike($a, qr/assertion "SvTYPE(sv) != SVt_PVCV" failed.*function: S_sv_2iuv_common/m); unlike($a, qr/Use of uninitialized value in print/m); diff --git a/cpan/Filter-Util-Call/Call.pm b/cpan/Filter-Util-Call/Call.pm index f5c1e7beb1..cfe9cb7886 100644 --- a/cpan/Filter-Util-Call/Call.pm +++ b/cpan/Filter-Util-Call/Call.pm @@ -9,18 +9,17 @@ package Filter::Util::Call ; -require 5.005 ; -require DynaLoader; +require 5.006 ; # our require Exporter; -use Carp ; + +use XSLoader (); use strict; use warnings; -use vars qw($VERSION $XS_VERSION @ISA @EXPORT) ; -@ISA = qw(Exporter DynaLoader); -@EXPORT = qw( filter_add filter_del filter_read filter_read_exact) ; -$VERSION = "1.57" ; -$XS_VERSION = $VERSION; +our @ISA = qw(Exporter); +our @EXPORT = qw( filter_add filter_del filter_read filter_read_exact) ; +our $VERSION = "1.58" ; +our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; sub filter_read_exact($) @@ -29,8 +28,10 @@ sub filter_read_exact($) my ($left) = $size ; my ($status) ; - croak ("filter_read_exact: size parameter must be > 0") - unless $size > 0 ; + unless ( $size > 0 ) { + require Carp; + Carp::croak("filter_read_exact: size parameter must be > 0"); + } # try to read a block which is exactly $size bytes long while ($left and ($status = filter_read($left)) > 0) { @@ -59,7 +60,7 @@ sub filter_add($) Filter::Util::Call::real_import($obj, (caller)[0], $coderef) ; } -bootstrap Filter::Util::Call ; +XSLoader::load('Filter::Util::Call'); 1; __END__ diff --git a/cpan/Filter-Util-Call/Call.xs b/cpan/Filter-Util-Call/Call.xs index 487c20b327..74c3676257 100644 --- a/cpan/Filter-Util-Call/Call.xs +++ b/cpan/Filter-Util-Call/Call.xs @@ -3,7 +3,7 @@ * * Author : Paul Marquess * Date : 2014-12-09 02:48:44 rurban - * Version : 1.57 + * Version : 1.58 * * Copyright (c) 1995-2011 Paul Marquess. All rights reserved. * Copyright (c) 2011-2014 Reini Urban. All rights reserved. diff --git a/cpan/Filter-Util-Call/t/call.t b/cpan/Filter-Util-Call/t/call.t index 7da20be95f..b2a0cad95f 100644 --- a/cpan/Filter-Util-Call/t/call.t +++ b/cpan/Filter-Util-Call/t/call.t @@ -15,9 +15,9 @@ use warnings; use vars qw($Inc $Perl); -print "1..32\n" ; +print "1..34\n"; -$Perl = "$Perl -w" ; +$Perl = "$Perl -w"; use Cwd ; my $here = getcwd ; @@ -39,39 +39,39 @@ my $redir = $^O eq 'MacOS' ? "" : "2>&1"; # Test error cases ################## -# no filter function in module +# no filter function in module ############################### writeFile("${module}.pm", <<EOM) ; package ${module} ; use Filter::Util::Call ; - + sub import { filter_add(bless []) } 1 ; EOM - + my $a = `$Perl "-I." $Inc -e "use ${module} ;" $redir` ; ok(1, (($? >>8) != 0 or (($^O eq 'MSWin32' || $^O eq 'MacOS' || $^O eq 'NetWare' || $^O eq 'mpeix') && $? != 0))) ; ok(2, $a =~ /^Can't locate object method "filter" via package "MyTest"/m) ; - + # no reference parameter in filter_add ###################################### writeFile("${module}.pm", <<EOM) ; package ${module} ; - + use Filter::Util::Call ; - + sub import { filter_add() } - + 1 ; EOM $a = `$Perl "-I." $Inc -e "use ${module} ;" $redir` ; #warn "# $a\n"; -ok(3, (($? >>8) != 0 +ok(3, (($? >>8) != 0 or (($^O eq 'MSWin32' || $^O eq 'MacOS' || $^O eq 'NetWare' || $^O eq 'mpeix') && $? != 0))) ; #ok(4, $a =~ /^usage: filter_add\(ref\) at ${module}.pm/) ; @@ -99,17 +99,17 @@ if ($] < 5.007) { writeFile("${module}.pm", <<EOM, <<'EOM') ; package ${module} ; - + EOM use Filter::Util::Call ; -sub import { +sub import { filter_add( sub { my ($status) ; if (($status = filter_read()) > 0) { - s/ABC/DEF/g + s/ABC/DEF/g } $status ; } ) ; @@ -117,7 +117,7 @@ sub import { 1 ; EOM - + writeFile($filename, <<EOM, <<'EOM') ; use $module ; @@ -144,34 +144,34 @@ EOM # a simple filter, not using a closure ################# - + writeFile("${module}.pm", <<EOM, <<'EOM') ; package ${module} ; - + EOM use Filter::Util::Call ; sub import { filter_add(bless []) } - + sub filter { my ($self) = @_ ; my ($status) ; - + if (($status = filter_read()) > 0) { s/ABC/DEF/g } $status ; } - + 1 ; EOM - + writeFile($filename, <<EOM, <<'EOM') ; - + use $module ; EOM - + use Cwd ; $here = getcwd ; print "I am $here\n" ; @@ -180,9 +180,9 @@ $y = "ABCDEF" ; print <<EOF ; Alphabetti Spagetti ($y) EOF - + EOM - + $a = `$Perl "-I." $Inc $filename $redir` ; ok(7, ($? >>8) == 0) ; ok(8, $a eq <<EOM) ; @@ -199,32 +199,32 @@ EOM writeFile("${module2}.pm", <<EOM, <<'EOM') ; package ${module2} ; use Filter::Util::Call ; - + EOM sub import { filter_add(bless []) } - + sub filter { my ($self) = @_ ; my ($status) ; - + if (($status = filter_read()) > 0) { s/XYZ/PQR/g } $status ; } - + 1 ; EOM - + writeFile("${module3}.pm", <<EOM, <<'EOM') ; package ${module3} ; use Filter::Util::Call ; - + EOM sub import { filter_add( - - sub + + sub { my ($status) ; @@ -252,50 +252,50 @@ EOM writeFile("${module5}.pm", <<EOM, <<'EOM') ; package ${module5} ; use Filter::Util::Call ; - + EOM sub import { filter_add(bless []) } - + sub filter { my ($self) = @_ ; my ($status) ; - + if (($status = filter_read()) > 0) { s/Today/Tomorrow/g } $status ; } - + 1 ; EOM writeFile($filename, <<EOM, <<'EOM') ; - + # two filters for this file use $module ; use $module2 ; require "$nested" ; use $module4 ; EOM - + print "some letters ABCXYZ\n" ; $y = "ABCDEFXYZ" ; print <<EOF ; Fred likes Alphabetti Spagetti ($y) EOF - + EOM - + writeFile($nested, <<EOM, <<'EOM') ; use $module3 ; EOM - + print "This is another file XYZ\n" ; print <<EOF ; Where is Fred? EOF - + EOM $a = `$Perl "-I." $Inc $filename $redir` ; @@ -312,61 +312,61 @@ EOM # using the module context (with a closure) ########################################### - - + + writeFile("${module2}.pm", <<EOM, <<'EOM') ; package ${module2} ; use Filter::Util::Call ; - + EOM sub import { my ($type) = shift ; my (@strings) = @_ ; - - + + filter_add ( - - sub + + sub { my ($status) ; my ($pattern) ; - + if (($status = filter_read()) > 0) { foreach $pattern (@strings) { s/$pattern/PQR/g } } - + $status ; } ) - + } 1 ; EOM - - + + writeFile($filename, <<EOM, <<'EOM') ; - + use $module2 qw( XYZ KLM) ; use $module2 qw( ABC NMO) ; EOM - + print "some letters ABCXYZ KLM NMO\n" ; $y = "ABCDEFXYZKLMNMO" ; print <<EOF ; Alphabetti Spagetti ($y) EOF - + EOM - + $a = `$Perl "-I." $Inc $filename $redir` ; ok(11, ($? >>8) == 0) ; ok(12, $a eq <<EOM) ; some letters PQRPQR PQR PQR Alphabetti Spagetti (PQRDEFPQRPQRPQR) EOM - + # using the module context (without a closure) @@ -376,23 +376,23 @@ EOM writeFile("${module2}.pm", <<EOM, <<'EOM') ; package ${module2} ; use Filter::Util::Call ; - + EOM -sub import -{ +sub import +{ my ($type) = shift ; my (@strings) = @_ ; - - filter_add (bless [@strings]) + + filter_add (bless [@strings]) } - + sub filter { my ($self) = @_ ; my ($status) ; my ($pattern) ; - + if (($status = filter_read()) > 0) { foreach $pattern (@$self) { s/$pattern/PQR/g } @@ -400,25 +400,25 @@ sub filter $status ; } - + 1 ; EOM - - + + writeFile($filename, <<EOM, <<'EOM') ; - + use $module2 qw( XYZ KLM) ; use $module2 qw( ABC NMO) ; EOM - + print "some letters ABCXYZ KLM NMO\n" ; $y = "ABCDEFXYZKLMNMO" ; print <<EOF ; Alphabetti Spagetti ($y) EOF - + EOM - + $a = `$Perl "-I." $Inc $filename $redir` ; ok(13, ($? >>8) == 0) ; ok(14, $a eq <<EOM) ; @@ -433,22 +433,22 @@ EOM writeFile("${module2}.pm", <<EOM, <<'EOM') ; package ${module2} ; use Filter::Util::Call ; - + EOM sub import -{ +{ my ($type) = shift ; my (@strings) = @_ ; - - filter_add(bless []) + + filter_add(bless []) } - + sub filter { my ($self) = @_ ; my ($status) ; - + # read first line if (($status = filter_read()) > 0) { chop ; @@ -459,32 +459,33 @@ sub filter $status ; } - + 1 ; EOM - - + + writeFile($filename, <<EOM, <<'EOM') ; - + use $module2 ; EOM print "don't cut me in half\n" ; -print +print <<EOF ; appen ded EO F - + EOM - + $a = `$Perl "-I." $Inc $filename $redir` ; ok(15, ($? >>8) == 0) ; ok(16, $a eq <<EOM) ; don't cut me in half appended EOM +#print "# $a\n"; # Block test ############# @@ -492,26 +493,26 @@ EOM writeFile("${block}.pm", <<EOM, <<'EOM') ; package ${block} ; use Filter::Util::Call ; - + EOM sub import -{ +{ my ($type) = shift ; my (@strings) = @_ ; - + filter_add (bless [@strings] ) } - + sub filter { my ($self) = @_ ; my ($status) ; my ($pattern) ; - + filter_read(20) ; } - + 1 ; EOM @@ -525,7 +526,7 @@ EOM writeFile($filename, <<EOM, $string ) ; use $block ; EOM - + $a = `$Perl "-I." $Inc $filename $redir` ; ok(17, ($? >>8) == 0) ; ok(18, $a eq <<EOM) ; @@ -540,31 +541,31 @@ EOM writeFile("${block}.pm", <<EOM, <<'EOM') ; package ${block} ; use Filter::Util::Call ; - + EOM use Cwd ; sub import -{ +{ my ($type) = shift ; my (@strings) = @_ ; - + filter_add(bless [@strings] ) } - + sub filter { my ($self) = @_ ; my ($status) ; my ($here) = quotemeta getcwd ; - + if (($status = filter_read()) > 0) { s/DIR/$here/g } $status ; } - + 1 ; EOM @@ -573,7 +574,7 @@ use $block ; EOM print "We are in DIR\n" ; EOM - + $a = `$Perl "-I." $Inc $filename $redir` ; ok(19, ($? >>8) == 0) ; ok(20, $a eq <<EOM) ; @@ -583,27 +584,27 @@ EOM # filter_del ############# - + writeFile("${block}.pm", <<EOM, <<'EOM') ; package ${block} ; use Filter::Util::Call ; - + EOM - + sub import { my ($type) = shift ; my ($count) = @_ ; - - + + filter_add(bless \$count ) } - + sub filter { my ($self) = @_ ; my ($status) ; - + s/HERE/THERE/g if ($status = filter_read()) > 0 ; @@ -612,10 +613,10 @@ sub filter $status ; } - + 1 ; EOM - + writeFile($filename, <<EOM, <<'EOM') ; use $block (3) ; EOM @@ -624,7 +625,7 @@ HERE I am I am HERE HERE today gone tomorrow\n" ; EOM - + $a = `$Perl "-I." $Inc $filename $redir` ; ok(21, ($? >>8) == 0) ; ok(22, $a eq <<EOM) ; @@ -637,35 +638,35 @@ EOM # filter_read_exact #################### - + writeFile("${block}.pm", <<EOM, <<'EOM') ; package ${block} ; use Filter::Util::Call ; - + EOM - + sub import { my ($type) = shift ; - + filter_add(bless [] ) } - + sub filter { my ($self) = @_ ; my ($status) ; - + if (($status = filter_read_exact(9)) > 0) { s/HERE/THERE/g } - + $status ; } - + 1 ; EOM - + writeFile($filenamebin, <<EOM, <<'EOM') ; use $block ; EOM @@ -674,7 +675,7 @@ HERE I am I'm HERE HERE today gone tomorrow\n" ; EOM - + $a = `$Perl "-I." $Inc $filenamebin $redir` ; ok(23, ($? >>8) == 0) ; ok(24, $a eq <<EOM) ; @@ -688,35 +689,35 @@ EOM # Check __DATA__ #################### - + writeFile("${block}.pm", <<EOM, <<'EOM') ; package ${block} ; use Filter::Util::Call ; - + EOM - + sub import { my ($type) = shift ; - + filter_add([]) } - + sub filter { my ($self) = @_ ; my ($status) ; - + if (($status = filter_read()) > 0) { s/HERE/THERE/g } - + $status ; } - + 1 ; EOM - + writeFile($filename, <<EOM, <<'EOM') ; use $block ; EOM @@ -728,7 +729,7 @@ HERE I am I'm HERE HERE today gone tomorrow EOM - + $a = `$Perl "-I." $Inc $filename $redir` ; ok(25, ($? >>8) == 0) ; ok(26, $a eq <<EOM) ; @@ -744,35 +745,35 @@ EOM # Check __END__ #################### - + writeFile("${block}.pm", <<EOM, <<'EOM') ; package ${block} ; use Filter::Util::Call ; - + EOM - + sub import { my ($type) = shift ; - + filter_add(bless [] ) } - + sub filter { my ($self) = @_ ; my ($status) ; - + if (($status = filter_read()) > 0) { s/HERE/THERE/g } - + $status ; } - + 1 ; EOM - + writeFile($filename, <<EOM, <<'EOM') ; use $block ; EOM @@ -784,7 +785,7 @@ HERE I am I'm HERE HERE today gone tomorrow EOM - + $a = `$Perl "-I." $Inc $filename $redir` ; ok(27, ($? >>8) == 0) ; ok(28, $a eq <<EOM) ; @@ -830,6 +831,48 @@ ok(32, $a eq 'ok'); } +# error: filter_read_exact: size parameter must be > 0 +###################################### + +writeFile("${block}.pm", <<EOM, <<'EOM') ; +package ${block} ; +use Filter::Util::Call ; + +EOM + +sub import +{ + my ($type) = shift ; + filter_add(bless [] ) +} + +sub filter +{ + my ($self) = @_ ; + my ($status) ; + if (($status = filter_read_exact(0)) > 0) { + s/HERE/THERE/g + } + $status ; +} + +1 ; +EOM + +writeFile($filenamebin, <<EOM, <<'EOM') ; +use $block ; +EOM +print " +HERE I am +I'm HERE +HERE today gone tomorrow\n" ; +EOM + +$a = `$Perl "-I." $Inc $filenamebin $redir` ; +ok(33, ($? >>8) != 0) ; +ok(34, $a =~ /^filter_read_exact: size parameter must be > 0 at block.pm/) ; + + END { 1 while unlink $filename ; 1 while unlink $filename2 ; diff --git a/cpan/experimental/lib/experimental.pm b/cpan/experimental/lib/experimental.pm index e6907c0b8b..6c0b49ee1b 100644 --- a/cpan/experimental/lib/experimental.pm +++ b/cpan/experimental/lib/experimental.pm @@ -1,5 +1,5 @@ package experimental; -$experimental::VERSION = '0.018'; +$experimental::VERSION = '0.019'; use strict; use warnings; use version (); @@ -130,7 +130,7 @@ experimental - Experimental features made easy =head1 VERSION -version 0.018 +version 0.019 =head1 SYNOPSIS -- Perl5 Master Repository