In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/5b615f05fa936a4d25984453e5dfbd4e32cc8f5b?hp=8717a761ed4c6bc51add235060c04edd152bcdb6>
- Log ----------------------------------------------------------------- commit 5b615f05fa936a4d25984453e5dfbd4e32cc8f5b Author: Chris 'BinGOs' Williams <[email protected]> Date: Thu Oct 16 12:29:13 2014 +0100 Update B-Debug to CPAN version 1.22 [DELTA] 1.22 2014-10-12 rurban * add 5.21.5 support: changed test, from blead for split optim., added METHOP * print 0x00000000 as 0x0 * add -d -MOd=Debug support * README: fixed copyright date M Porting/Maintainers.pl M cpan/B-Debug/Debug.pm M cpan/B-Debug/t/debug.t commit 9c71c2c57ff730c06c50ae800ee5e7652be91895 Author: Chris 'BinGOs' Williams <[email protected]> Date: Thu Oct 16 12:27:15 2014 +0100 Update experimental to CPAN version 0.012 [DELTA] 0.012 2014-10-12 12:10:06+02:00 Europe/Amsterdam Added lvalue references feature M Porting/Maintainers.pl M cpan/experimental/lib/experimental.pm M cpan/experimental/t/basic.t ----------------------------------------------------------------------- Summary of changes: Porting/Maintainers.pl | 4 ++-- cpan/B-Debug/Debug.pm | 23 ++++++++++++++++++++--- cpan/B-Debug/t/debug.t | 6 +++++- cpan/experimental/lib/experimental.pm | 14 +++++++++++--- cpan/experimental/t/basic.t | 9 +++++++++ 5 files changed, 47 insertions(+), 9 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 03c2744..b8bd836 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -177,7 +177,7 @@ use File::Glob qw(:case); }, 'B::Debug' => { - 'DISTRIBUTION' => 'RURBAN/B-Debug-1.21.tar.gz', + 'DISTRIBUTION' => 'RURBAN/B-Debug-1.22.tar.gz', 'FILES' => q[cpan/B-Debug], 'EXCLUDED' => ['t/pod.t'], }, @@ -413,7 +413,7 @@ use File::Glob qw(:case); }, 'experimental' => { - 'DISTRIBUTION' => 'LEONT/experimental-0.011.tar.gz', + 'DISTRIBUTION' => 'LEONT/experimental-0.012.tar.gz', 'FILES' => q[cpan/experimental], 'EXCLUDED' => [ qr{^t/release-.*\.t}, diff --git a/cpan/B-Debug/Debug.pm b/cpan/B-Debug/Debug.pm index e9a83ae..6f0c4c6 100644 --- a/cpan/B-Debug/Debug.pm +++ b/cpan/B-Debug/Debug.pm @@ -1,6 +1,6 @@ package B::Debug; -our $VERSION = '1.21'; +our $VERSION = '1.22'; use strict; require 5.006; @@ -36,7 +36,11 @@ sub _printop { my $op = shift; my $addr = ${$op} ? $op->ppaddr : ''; $addr =~ s/^PL_ppaddr// if $addr; - return sprintf "0x%08x %6s %s", ${$op}, ${$op} ? class($op) : '', $addr; + if (${$op}) { + return sprintf "0x%08x %6s %s", ${$op}, class($op), $addr; + } else { + return sprintf "0x%x %6s %s", ${$op}, '', $addr; + } } sub B::OP::debug { @@ -151,6 +155,18 @@ sub B::SVOP::debug { $op->sv->debug; } +sub B::METHOP::debug { + my ($op) = @_; + $op->B::OP::debug(); + if (${$op->first}) { + printf "\top_first\t0x%x\n", ${$op->first}; + $op->first->debug; + } else { + printf "\top_meth_sv\t0x%x\n", ${$op->meth_sv}; + $op->meth_sv->debug; + } +} + sub B::PVOP::debug { my ($op) = @_; $op->B::OP::debug(); @@ -376,6 +392,7 @@ EOT sub compile { my $order = shift; B::clearsym(); + $DB::single = 1 if defined &DB::DB; if ($order && $order eq "exec") { return sub { walkoptree_exec(main_start, "debug") } } else { @@ -413,7 +430,7 @@ Reini Urban C<[email protected]> =head1 LICENSE Copyright (c) 1996, 1997 Malcolm Beattie -Copyright (c) 2008, 2010, 2013 Reini Urban +Copyright (c) 2008, 2010, 2013, 2014 Reini Urban This program is free software; you can redistribute it and/or modify it under the terms of either: diff --git a/cpan/B-Debug/t/debug.t b/cpan/B-Debug/t/debug.t index 0af3bd9..f4f0a10 100644 --- a/cpan/B-Debug/t/debug.t +++ b/cpan/B-Debug/t/debug.t @@ -75,7 +75,11 @@ EOF #$b .= " nextstate" if $] < 5.008001; # ?? $b=~s/\n/ /g; $b=~s/\s+/ /g; $b =~ s/\s+$//; -is($a, $b); + +TODO: { + local $TODO = '5.21.5 split optimization' if $] == 5.021005; + 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\]/); diff --git a/cpan/experimental/lib/experimental.pm b/cpan/experimental/lib/experimental.pm index b91ac7d..efb853e 100644 --- a/cpan/experimental/lib/experimental.pm +++ b/cpan/experimental/lib/experimental.pm @@ -1,5 +1,5 @@ package experimental; -$experimental::VERSION = '0.011'; +$experimental::VERSION = '0.012'; use strict; use warnings; use version (); @@ -25,6 +25,7 @@ my %min_version = ( fc => '5.16.0', lexical_topic => '5.10.0', lexical_subs => '5.18.0', + lvalue_refs => '5.21.5', postderef => '5.20.0', postderef_qq => '5.20.0', regex_sets => '5.18.0', @@ -58,7 +59,13 @@ sub _enable { croak "Can't enable unknown feature $pragma"; } elsif ($min_version{$pragma} > $]) { - croak "Need perl $min_version{$pragma} or later for feature $pragma"; + my $stable = $min_version{$pragma}; + if ($stable->{version}[1] % 2) { + $stable = version->new( + "5.".($stable->{version}[1]+1).'.0' + ); + } + croak "Need perl $stable or later for feature $pragma"; } } @@ -112,7 +119,7 @@ experimental - Experimental features made easy =head1 VERSION -version 0.011 +version 0.012 =head1 SYNOPSIS @@ -146,6 +153,7 @@ The supported features, documented further below, are: array_base - allow the use of $[ to change the starting index of @array autoderef - allow push, each, keys, and other built-ins on references lexical_topic - allow the use of lexical $_ via "my $_" + lvalue_refs - allow aliasing via \$x = \$y postderef - allow the use of postfix dereferencing expressions, including in interpolating strings regex_sets - allow extended bracketed character classes in regexps diff --git a/cpan/experimental/t/basic.t b/cpan/experimental/t/basic.t index 239225b..5dc2eaf 100644 --- a/cpan/experimental/t/basic.t +++ b/cpan/experimental/t/basic.t @@ -50,5 +50,14 @@ if ($] >= 5.018) { END } +if ($] >= 5.021005) { + is (eval <<'END', 1, 'lvalue ref compiles') or diag $@; + use experimental 'lvalue_refs'; + \@a = \@b; + is(\@a, \@b, '@a and @b are the same after \@a=\@b'); + 1; +END +} + done_testing; -- Perl5 Master Repository
