Skip Menu |

This queue is for tickets about the Devel-Spy CPAN distribution.

Report information
The Basics
Id: 103963
Status: open
Priority: 0/
Queue: Devel-Spy

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.07
Fixed in: (no value)



Subject: Test fails with perl 5.21.9 and later
Test log with perl 5.21.11: Output from '/usr/bin/make test': PERL_DL_NONLAZY=1 "/usr/perl5.21.11p/bin/perl5.21.11" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t Subroutine B::OP::parent redefined at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188. at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188. require B/Utils.pm called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/UNIVERSAL/ref.pm line 7 UNIVERSAL::ref::BEGIN() called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188 eval {...} called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188 require UNIVERSAL/ref.pm called at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_obj.pm line 17 Devel::Spy::_obj::BEGIN() called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188 eval {...} called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188 require Devel/Spy/_obj.pm called at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy.pm line 98 Devel::Spy::BEGIN() called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188 eval {...} called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188 require Devel/Spy.pm called at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/t/lib/Devel/Spy/Test.pm line 21 Devel::Spy::Test::BEGIN() called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188 eval {...} called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188 require Devel/Spy/Test.pm called at t/runtests.t line 15 main::BEGIN() called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188 eval {...} called at /usr/perl5.21.11p/lib/site_perl/5.21.11/amd64-freebsd/B/Utils.pm line 188 syntax error at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm line 1400, near "&." syntax error at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm line 1414, near "&." syntax error at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm line 1435, near "&.=" syntax error at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm line 1449, near "&.=" syntax error at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm line 1470, near "|." syntax error at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm line 1484, near "|." syntax error at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm line 1505, near "|.=" syntax error at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm line 1519, near "|.=" syntax error at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm line 1540, near "^." syntax error at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm line 1554, near "^." /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_overload.pm has too many errors. Compilation failed in require at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_obj.pm line 20. BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy/_obj.pm line 20. Compilation failed in require at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy.pm line 98. BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/blib/lib/Devel/Spy.pm line 98. Compilation failed in require at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/t/lib/Devel/Spy/Test.pm line 21. BEGIN failed--compilation aborted at /home/cpansand/.cpan/build/Devel-Spy-0.07-RtD_PV/t/lib/Devel/Spy/Test.pm line 21. Compilation failed in require at t/runtests.t line 15. BEGIN failed--compilation aborted at t/runtests.t line 15. t/runtests.t .. Dubious, test returned 255 (wstat 65280, 0xff00) No subtests run
overload.PL generates overload entries for all possible overloads, including new operators available only under 'use feature.' Those bits should only be generated on suitable perls, and should include "use feature" when needed. Once this is done, it won't be safe to share the generated .pm between perls, so to be extremely vigilant you might want to force it to install to arch... but sharing install dirs isn't as common now as it once was. I will look at producing a patch. Josh, if I do that, can you make a new release? -- rjbs
Two patches applied. Once fixes tests for bitwise operators. I've tested it on 5.21.10 and on 5.8.8. The other avoids a new warning, similarly tested. -- rjbs
Subject: 0001-work-with-bitwise-feature-from-perl-v5.22.patch
From bd552cbaba02ee62d542f0a6b6b9063f658cf856 Mon Sep 17 00:00:00 2001 From: Ricardo Signes <rjbs@cpan.org> Date: Wed, 29 Apr 2015 10:59:39 -0400 Subject: [PATCH 1/2] work with bitwise feature from perl v5.22 --- overload.PL | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/overload.PL b/overload.PL index ef27930..b928b33 100755 --- a/overload.PL +++ b/overload.PL @@ -275,10 +275,12 @@ CONVERSION print map { my $op = $_; + my $maybe_pragma = /^[&^|]\.\z/ ? "use experimental 'bitwise';" : ''; <<"BINARY"; '${op}' => Sub::Name::subname( '${op}', sub { + $maybe_pragma my ( \$result, \$followup ); if ( \$_[$INVERTED] ) { \$result = \$_[$OTHER] $op \$_[$SELF][$TIED_PAYLOAD]; @@ -313,7 +315,8 @@ print ), BINARY } - grep { ! /^[|&^]=\z/ } + grep { $] >= 5.021009 || ! /^[&^|]\.\z/ } + grep { ! /^[&^|]\.?=\z/ } map split(' '), @overload::ops{qw( with_assign @@ -354,10 +357,12 @@ MUTATOR print map { my $op = $_; + my $maybe_pragma = /^[&^|~]\.=\z/ ? "use experimental 'bitwise';" : ''; <<"ASSIGNMENT"; '${op}' => Sub::Name::subname( '${op}', sub { + $maybe_pragma \$_[$SELF][$TIED_PAYLOAD] $op \$_[$OTHER]; my \$followup = \$_[$SELF][$CODE]->( '->($op ' @@ -371,6 +376,7 @@ print ), ASSIGNMENT } + grep { $] >= 5.021009 || ! /^[&^|~]\.=\z/ } grep { /=$/ } map split(' '), @overload::ops{qw( @@ -382,11 +388,13 @@ ASSIGNMENT print map { my $op = $_; + my $maybe_pragma = /^~\.\z/ ? "use experimental 'bitwise';" : ''; my $actual_op = $op eq 'neg' ? '!' : $op; <<"UNARY"; '${op}' => Sub::Name::subname( '${op}', sub { + $maybe_pragma my \$result = $actual_op \$_[$SELF][$TIED_PAYLOAD]; my \$followup = \$_[$SELF][$CODE]->( " ->($op" @@ -401,6 +409,7 @@ print UNARY } grep { $_ ne 'atan2' } + grep { $] >= 5.021009 || ! /^~\.\z/ } map split(' '), @overload::ops{qw( unary -- 2.3.6
Subject: 0002-avoid-unescape-brace-warnings-in-Devel-Spy-Test.patch
From 10801b6b72956ab5eceb269d409a2b47f594d7e6 Mon Sep 17 00:00:00 2001 From: Ricardo Signes <rjbs@cpan.org> Date: Wed, 29 Apr 2015 11:04:35 -0400 Subject: [PATCH 2/2] avoid unescape-brace warnings in Devel::Spy::Test (these warnings are pretty new) --- t/lib/Devel/Spy/Test.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/lib/Devel/Spy/Test.pm b/t/lib/Devel/Spy/Test.pm index 2401763..7f31112 100755 --- a/t/lib/Devel/Spy/Test.pm +++ b/t/lib/Devel/Spy/Test.pm @@ -61,10 +61,10 @@ sub hash_value : Test(8) { $outside{foo} = 42; is( $inside{foo}, 42, 'Wrapped hash got assignment' ); - like( "@log", qr/^->{foo} = 42/m, 'Log reflects the STORE' ); + like( "@log", qr/^->\{foo\} = 42/m, 'Log reflects the STORE' ); is( $outside{foo}, 42, 'Wrapper reflects the assignment' ); - like( "@log", qr/->{foo} -> 42/m, 'Log reflects the fetch' ); + like( "@log", qr/->\{foo\} -> 42/m, 'Log reflects the fetch' ); # Clean up circular reference undef $logger; -- 2.3.6