Skip Menu |

This queue is for tickets about the namespace-clean CPAN distribution.

Report information
The Basics
Id: 69862
Status: resolved
Priority: 0/
Queue: namespace-clean

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.20
Fixed in: 0.22



Subject: t/author-07-debugger.t fails with 5.14.1
Not sure if you're aware of this, or if it's a problem with the test or the module itself, so I thought I'd better report it: $ make test AUTHOR_TESTING=1 RELEASE_TESTING=1 PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-basic.t .............. ok t/01-function-wipeout.t ... ok t/02-inheritance.t ........ ok t/03-unimport.t ........... ok t/04-except.t ............. ok t/05-explicit-cleanee.t ... ok t/06-other-types.t ........ ok t/08-const-sub.t .......... ok Loading DB routines from perl5db.pl version 1.33 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(t/author-07-debugger.t:21): package Foo; Undefined subroutine &Foo::foo called at /usr/share/perl5/perl5db.pl line 3737. at /usr/share/perl5/perl5db.pl line 3737 Foo::bar('Foo') called at t/author-07-debugger.t line 37 # Tests were run but no plan was declared and done_testing() was not seen. t/author-07-debugger.t .... Dubious, test returned 255 (wstat 65280, 0xff00) All 3 subtests passed t/release-eol.t ........... ok t/release-no-tabs.t ....... ok t/release-pod-coverage.t .. ok t/release-pod-syntax.t .... ok Test Summary Report ------------------- t/author-07-debugger.t (Wstat: 65280 Tests: 3 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output Files=13, Tests=128, 0 wallclock secs ( 0.05 usr 0.02 sys + 0.59 cusr 0.09 csys = 0.75 CPU) Result: FAIL Failed 1/13 test programs. 0/128 subtests failed. This is with perl 5.14.1 in Fedora's current development branch.
On Thu Jul 28 10:23:35 2011, paul@city-fan.org wrote: Show quoted text
> Not sure if you're aware of this, or if it's a problem with the test or > the module itself, so I thought I'd better report it: > > $ make test AUTHOR_TESTING=1 RELEASE_TESTING=1 > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/00-basic.t .............. ok > t/01-function-wipeout.t ... ok > t/02-inheritance.t ........ ok > t/03-unimport.t ........... ok > t/04-except.t ............. ok > t/05-explicit-cleanee.t ... ok > t/06-other-types.t ........ ok > t/08-const-sub.t .......... ok > Loading DB routines from perl5db.pl version 1.33 > Editor support available. > Enter h or `h h' for help, or `man perldebug' for more help. > main::(t/author-07-debugger.t:21): package Foo; > Undefined subroutine &Foo::foo called at /usr/share/perl5/perl5db.pl > line 3737. > at /usr/share/perl5/perl5db.pl line 3737 > Foo::bar('Foo') called at t/author-07-debugger.t line 37 > # Tests were run but no plan was declared and done_testing() was not seen. > t/author-07-debugger.t .... > Dubious, test returned 255 (wstat 65280, 0xff00) > All 3 subtests passed > t/release-eol.t ........... ok > t/release-no-tabs.t ....... ok > t/release-pod-coverage.t .. ok > t/release-pod-syntax.t .... ok > Test Summary Report > ------------------- > t/author-07-debugger.t (Wstat: 65280 Tests: 3 Failed: 0) > Non-zero exit status: 255 > Parse errors: No plan found in TAP output > Files=13, Tests=128, 0 wallclock secs ( 0.05 usr 0.02 sys + 0.59 cusr > 0.09 csys = 0.75 CPU) > Result: FAIL > Failed 1/13 test programs. 0/128 subtests failed. > > This is with perl 5.14.1 in Fedora's current development branch.
I haven’t looked very far, but I wonder whether this is related to <https://rt.perl.org/rt3/Ticket/Display.html?id=48332>, since the test is skipped in 5.8.8.
RT-Send-CC: andreas.koenig.7os6VVqR [...] franz.ak.mind.de
On Mon Nov 14 18:48:15 2011, SPROUT wrote: Show quoted text
> On Thu Jul 28 10:23:35 2011, paul@city-fan.org wrote:
> > Not sure if you're aware of this, or if it's a problem with the test
> or
> > the module itself, so I thought I'd better report it: > > > > $ make test AUTHOR_TESTING=1 RELEASE_TESTING=1 > > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > > t/00-basic.t .............. ok > > t/01-function-wipeout.t ... ok > > t/02-inheritance.t ........ ok > > t/03-unimport.t ........... ok > > t/04-except.t ............. ok > > t/05-explicit-cleanee.t ... ok > > t/06-other-types.t ........ ok > > t/08-const-sub.t .......... ok > > Loading DB routines from perl5db.pl version 1.33 > > Editor support available. > > Enter h or `h h' for help, or `man perldebug' for more help. > > main::(t/author-07-debugger.t:21): package Foo; > > Undefined subroutine &Foo::foo called at /usr/share/perl5/perl5db.pl > > line 3737. > > at /usr/share/perl5/perl5db.pl line 3737 > > Foo::bar('Foo') called at t/author-07-debugger.t line 37 > > # Tests were run but no plan was declared and done_testing() was not
> seen.
> > t/author-07-debugger.t .... > > Dubious, test returned 255 (wstat 65280, 0xff00) > > All 3 subtests passed > > t/release-eol.t ........... ok > > t/release-no-tabs.t ....... ok > > t/release-pod-coverage.t .. ok > > t/release-pod-syntax.t .... ok > > Test Summary Report > > ------------------- > > t/author-07-debugger.t (Wstat: 65280 Tests: 3 Failed: 0) > > Non-zero exit status: 255 > > Parse errors: No plan found in TAP output > > Files=13, Tests=128, 0 wallclock secs ( 0.05 usr 0.02 sys + 0.59
> cusr
> > 0.09 csys = 0.75 CPU) > > Result: FAIL > > Failed 1/13 test programs. 0/128 subtests failed. > > > > This is with perl 5.14.1 in Fedora's current development branch.
> > I haven’t looked very far, but I wonder whether this is related to > <https://rt.perl.org/rt3/Ticket/Display.html?id=48332>, since the test > is skipped in 5.8.8.
I’m now not so sure it is, but this will be much easier to track down with a binary search. I’m cc’ing Andreas König, since he has everything set up to do that already. Andreas, is it easy enough for you to do a binary search that runs perl -Mblib xt/author/07-debugger.t after building namespace::clean?
v5.13.5-258-gbe1cc45 commit be1cc4519b5ba35ec8c5b8a2b4a62c72cff05a2e Author: Father Chrysostomos <sprout@cpan.org> Date: Thu Sep 30 23:48:56 2010 -0700 [perl #48332] Debugger corrupts symbol table munging Yes, it is easy enough:)
On Wed Nov 16 02:04:37 2011, ANDK wrote: Show quoted text
> v5.13.5-258-gbe1cc45 > > commit be1cc4519b5ba35ec8c5b8a2b4a62c72cff05a2e > Author: Father Chrysostomos <sprout@cpan.org> > Date: Thu Sep 30 23:48:56 2010 -0700 > > [perl #48332] Debugger corrupts symbol table munging > > > Yes, it is easy enough:)
So it’s my fault. All I did was restore the previous behaviour by undoing a refactoring (which was only supposed to be a refactoring, but actually changed the logic), in order to fix a bug introduced by that refactoring. That would explain why 5.8.8 and 5.14.0 behave exactly the same way. Now I need to learn more about the debugger....
On Thu Nov 17 19:21:42 2011, SPROUT wrote: Show quoted text
> On Wed Nov 16 02:04:37 2011, ANDK wrote:
> > v5.13.5-258-gbe1cc45 > > > > commit be1cc4519b5ba35ec8c5b8a2b4a62c72cff05a2e > > Author: Father Chrysostomos <sprout@cpan.org> > > Date: Thu Sep 30 23:48:56 2010 -0700 > > > > [perl #48332] Debugger corrupts symbol table munging > > > > > > Yes, it is easy enough:)
> > So it’s my fault. All I did was restore the previous behaviour by > undoing a refactoring (which > was only supposed to be a refactoring, but actually changed the > logic), in order to fix a bug > introduced by that refactoring. > > That would explain why 5.8.8 and 5.14.0 behave exactly the same way. > > Now I need to learn more about the debugger.... >
When DB::sub() is about to be called (to handle a sub call under the debugger), $DB::sub is set to the name of the sub or a reference to the sub. Every CV (subroutine) has a pointer to the GV (typeglob) it was defined in. Every GV obviously has a CV slot. ‘entersub’ refers to the subroutine-call operator (&foo or foo()). Usually the argument to entersub is a GV (as in foo()) or a CV ref ((\&foo)->()). The logic in 5.8.8 and 5.14.0 is (from util.c:Perl_get_db_sub): If the subroutine is anonymous or is named END or ( is not being called from the glob it was defined in and ( the argument to entersub is not a GV or the CV in the GV argument to entersub is not the current CV (e.g., autoloading) ) ) then put a code reference in $DB::sub else put the name of the GV argument to entersub in $DB::sub In 5.8.9-5.12, the else is: else put the name of the CV’s GV in $DB::sub That inadvertent change in 5.8.9 made *a = \&b effectively substitute b() for a(), causing bugs, which is why I reverted it. That would explain why changing the subroutine’s name (which I believe entails creating a glob with that name and changing the CV’s GV pointer to point to it) works. I think that initial logic is faulty in all Perl versions. Now I just need to think of a workaround.
On Thu Nov 17 19:40:07 2011, SPROUT wrote: Show quoted text
> The logic in 5.8.8 and 5.14.0 is (from util.c:Perl_get_db_sub): > > If the subroutine > is anonymous > or is named END > or ( > is not being called from the glob it was defined in
Actually, that bit is ‘does not reside in the glob in which it was defined’. Show quoted text
> and > ( > the argument to entersub is not a GV > or the CV in the GV argument to entersub is not the current > CV > (e.g., autoloading) > ) > ) > then put a code reference in $DB::sub > else put the name of the GV argument to entersub in $DB::sub
On Thu Nov 17 19:40:07 2011, SPROUT wrote: Show quoted text
> I think that initial logic is faulty in all Perl versions. Now I just > need to think of a workaround.
I believe that renaming the GV itself (the one bound to the ops) and inserting it into the symbol table under its new name will solve the problem. I don’t know whether there are any CPAN modules that do that already. If I can’t find a way to do it in pure Perl, would you be willing to maintain an XS module? I have enough modules already. :-) That code in perl is *so* buggy. There are so many things wrong with that logic. You shouldn’t have to do any of these workarounds. You probably won’t have to in 5.16. :-)
On Thu Nov 17 21:23:03 2011, SPROUT wrote: Show quoted text
> On Thu Nov 17 19:40:07 2011, SPROUT wrote:
> > I think that initial logic is faulty in all Perl versions. Now I
> just
> > need to think of a workaround.
> > I believe that renaming the GV itself (the one bound to the ops) and > inserting it into the symbol > table under its new name will solve the problem. I don’t know whether > there are any CPAN > modules that do that already. If I can’t find a way to do it in pure > Perl....
Actually, it’s easy. The C code in perl is using gv_efullname: gv_efullname3(dbsv, gv, NULL); (with an e before fullname), so assigning another glob to it (after saving the slots) should do the trick (and then restore the slots).
On Thu Nov 17 21:26:17 2011, SPROUT wrote: Show quoted text
> On Thu Nov 17 21:23:03 2011, SPROUT wrote:
> > On Thu Nov 17 19:40:07 2011, SPROUT wrote:
> > > I think that initial logic is faulty in all Perl versions. Now I
> > just
> > > need to think of a workaround.
> > > > I believe that renaming the GV itself (the one bound to the ops) and > > inserting it into the symbol > > table under its new name will solve the problem. I don’t know
> whether
> > there are any CPAN > > modules that do that already. If I can’t find a way to do it in pure > > Perl....
> > Actually, it’s easy. The C code in perl is using gv_efullname: > > gv_efullname3(dbsv, gv, NULL); > > (with an e before fullname), so assigning another glob to it (after > saving the slots) should do > the trick (and then restore the slots).
I have a patch for you. It fixes #72368 as well in 5.14. BTW, you need to increase the required version of Package::Stash, as you are using methods added in 0.14.
Subject: open_JVPLmVXt.txt
diff -rup namespace-clean-0.21-Lkbz_J-orig/lib/namespace/clean.pm namespace-clean-0.21-Lkbz_J/lib/namespace/clean.pm --- namespace-clean-0.21-Lkbz_J-orig/lib/namespace/clean.pm 2011-08-03 14:46:30.000000000 -0700 +++ namespace-clean-0.21-Lkbz_J/lib/namespace/clean.pm 2011-11-18 05:17:45.000000000 -0800 @@ -219,11 +219,16 @@ it is your responsibility to make sure i =cut +# Constant to optimise away the unused code branches +use constant RENAME_SUB => $] > 5.0080089 && $] < 5.0130061; +{ no strict; delete ${__PACKAGE__."::"}{RENAME_SUB} } + my $sub_utils_loaded; my $DebuggerRename = sub { my ($f, $sub, $cleanee_stash, $deleted_stash) = @_; - if (! defined $sub_utils_loaded ) { + if (RENAME_SUB) { + if (! defined $sub_utils_loaded ) { $sub_utils_loaded = do { my $sn_ver = 0.04; eval { require Sub::Name; Sub::Name->VERSION($sn_ver) } @@ -235,12 +240,16 @@ my $DebuggerRename = sub { 1; } ? 1 : 0; - } + } - if ( Sub::Identify::sub_fullname($sub) eq ($cleanee_stash->name . "::$f") ) { + if ( Sub::Identify::sub_fullname($sub) eq ($cleanee_stash->name . "::$f") ) { my $new_fq = $deleted_stash->name . "::$f"; Sub::Name::subname($new_fq, $sub); $deleted_stash->add_symbol("&$f", $sub); + } + } + else { + $deleted_stash->add_symbol("&$f", $sub); } }; @@ -259,12 +268,24 @@ my $RemoveSubs = sub { my $sub = $cleanee_stash->get_symbol("&$f") or next SYMBOL; - if ($^P and ref(\$cleanee_stash->namespace->{$f}) eq 'GLOB') { + my $debugger_fixup = + $^P && ref(my $globref = \$cleanee_stash->namespace->{$f}) + eq 'GLOB'; + + if ($debugger_fixup) { # convince the Perl debugger to work - # it assumes that sub_fullname($sub) can always be used to find the CV again + # In perl 5.8.9-5.12, it assumes that sub_fullname($sub) can + # always be used to find the CV again. + # In perl 5.8.8 and 5.14, it assumes that the name of the glob + # passed to entersub can be used to find the CV. # since we are deleting the glob where the subroutine was originally - # defined, that assumption no longer holds, so we need to move it - # elsewhere and point the CV's name to the new glob. + # defined, those assumptions no longer hold. + # + # So in 5.8.9-5.12 we need to move it elsewhere and point the + # CV's name to the new glob. + # + # In 5.8.8 and 5.14 we move it elsewhere and rename the + # original glob by assigning the new glob back to it. $DebuggerRename->( $f, $sub, @@ -281,6 +302,10 @@ my $RemoveSubs = sub { $cleanee_stash->remove_glob($f); + if (!RENAME_SUB && $debugger_fixup) { + *$globref = $deleted_stash->namespace->{$f}; + } + $cleanee_stash->add_symbol(@$_) for @symbols; } };
On Fri Nov 18 08:35:14 2011, SPROUT wrote: Show quoted text
> BTW, you need to increase the required version of Package::Stash, as > you are using methods > added in 0.14.
I must be going insane. When I ran Makefile.PL with a perl that had an older Package::Stash installed, I completely missed the EUMM warning. So disregard that.
On Fri Nov 18 08:35:14 2011, SPROUT wrote: Show quoted text
> On Thu Nov 17 21:26:17 2011, SPROUT wrote:
> > On Thu Nov 17 21:23:03 2011, SPROUT wrote:
> > > On Thu Nov 17 19:40:07 2011, SPROUT wrote:
> > > > I think that initial logic is faulty in all Perl versions. Now
> I
> > > just
> > > > need to think of a workaround.
> > > > > > I believe that renaming the GV itself (the one bound to the ops)
> and
> > > inserting it into the symbol > > > table under its new name will solve the problem. I don’t know
> > whether
> > > there are any CPAN > > > modules that do that already. If I can’t find a way to do it in
> pure
> > > Perl....
> > > > Actually, it’s easy. The C code in perl is using gv_efullname: > > > > gv_efullname3(dbsv, gv, NULL); > > > > (with an e before fullname), so assigning another glob to it (after > > saving the slots) should do > > the trick (and then restore the slots).
> > I have a patch for you. It fixes #72368 as well in 5.14.
And I have just confirmed that it works in 5.8.8, too, so you can remove the skip from 07- debugger.t.
On Fri Nov 18 08:40:04 2011, SPROUT wrote: Show quoted text
> On Fri Nov 18 08:35:14 2011, SPROUT wrote:
> > On Thu Nov 17 21:26:17 2011, SPROUT wrote:
> > > On Thu Nov 17 21:23:03 2011, SPROUT wrote:
> > > > On Thu Nov 17 19:40:07 2011, SPROUT wrote:
> > > > > I think that initial logic is faulty in all Perl versions.
> Now
> > I
> > > > just
> > > > > need to think of a workaround.
> > > > > > > > I believe that renaming the GV itself (the one bound to the ops)
> > and
> > > > inserting it into the symbol > > > > table under its new name will solve the problem. I don’t know
> > > whether
> > > > there are any CPAN > > > > modules that do that already. If I can’t find a way to do it in
> > pure
> > > > Perl....
> > > > > > Actually, it’s easy. The C code in perl is using gv_efullname: > > > > > > gv_efullname3(dbsv, gv, NULL); > > > > > > (with an e before fullname), so assigning another glob to it
> (after
> > > saving the slots) should do > > > the trick (and then restore the slots).
> > > > I have a patch for you. It fixes #72368 as well in 5.14.
> > And I have just confirmed that it works in 5.8.8, too, so you can > remove the skip from 07- > debugger.t.
And you should be able to skip the workarounds in 5.15.5. I haven’t merged the perl fixes yet, but they are attached here in case you want to try things out before I get to that.
Subject: open_vGuQ3tHH.txt
From e9b078c829d964f27a86eb40c84e74e44918e01c Mon Sep 17 00:00:00 2001 From: Father Chrysostomos <sprout@cpan.org> Date: Fri, 18 Nov 2011 09:08:32 -0800 Subject: [PATCH] Make sure $DB::sub is callable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When DB::sub is about to be called (to handle a subroutine call under the debugger), $DB::sub is set to the name of the subroutine or a ref- erence to it. Sometimes $DB::sub is set to the name when the subroutine is not call- able under that name. That should not happen. This logic in util.c:Perl_get_db_sub decides whether a reference should be used: if ( svp && ((CvFLAGS(cv) & (CVf_ANON | CVf_CLONED)) || strEQ(GvNAME(gv), "END") || ((GvCV(gv) != cv) && /* Could be imported, and old sub redefined. */ !( (SvTYPE(*svp) == SVt_PVGV) && (GvCV((const GV *)*svp) == cv) && (gv = (GV *)*svp) ) ) )) { /* Use GV from the stack as a fallback. */ (That comment about using the GV from the stack as a fallback applies to the assignment to gv, but was mistakenly divorced from it in commit 3de9ffa12.) This logic (introduced in 71be2cbc7 [inseparable changes from perl5.003_13 to perl5.003_14] and integrated into blead in 491527d02) tries to find a GV that points to the CV, trying the CV’s own GV first, and falling back to what is on the stack. But it does not account for GVs that are not found under their names, which can hap- pen when a glob is copied and the original is undefined ($foo = *bar; undef *bar; &$foo) or when a stash element or package is deleted, such as via Symbol::delete_package. If the subroutine is not locatable under its own name or the name under which it was called (the name of the GV argument to entersub), then a reference should be passed. Otherwise a name that can access the sub should be passed. So this commit adds more (no, not more!) conditions to make sure the gv is actually reachable under its name before using a string. Since, for effiency, those conditions do not perform an actual symbol lookup, but simply look inside the GV’s stash, we can no longer rely on gv_efullname (or even gv_fullname), as the stash may have been moved around, but use HvENAME and construct the GV name ourselves. diff --git a/t/run/switchd.t b/t/run/switchd.t index 3ea4681..9246b35 100644 --- a/t/run/switchd.t +++ b/t/run/switchd.t @@ -9,7 +9,7 @@ BEGIN { require "./test.pl"; } # This test depends on t/lib/Devel/switchd*.pm. -plan(tests => 5); +plan(tests => 6); my $r; @@ -78,3 +78,19 @@ like( qr "1\r?\n2\r?\n", 'Subroutine redefinition works in the debugger [perl #48332]', ); + +# [rt.cpan.org #69862] +like( + runperl( + switches => [ '-Ilib', '-d:switchd_empty' ], + progs => [ + 'sub DB::sub { goto &$DB::sub }', + 'sub foo { print qq _1\n_ }', + 'sub bar { print qq _2\n_ }', + 'delete $::{foo}; eval { foo() };', + 'my $bar = *bar; undef *bar; eval { &$bar };', + ], + ), + qr "1\r?\n2\r?\n", + 'Subroutines no longer found under their names can be called', +); diff --git a/util.c b/util.c index 221dee5..866565a 100644 --- a/util.c +++ b/util.c @@ -6523,6 +6523,19 @@ long _ftol( double ); /* Defined by VC6 C libs. */ long _ftol2( double dblSource ) { return _ftol( dblSource ); } #endif +PERL_STATIC_INLINE bool +S_gv_has_usable_name(pTHX_ GV *gv) +{ + GV **gvp; + return GvSTASH(gv) + && HvENAME(GvSTASH(gv)) + && (gvp = (GV **)hv_fetch( + GvSTASH(gv), GvNAME(gv), + GvNAMEUTF8(gv) ? -GvNAMELEN(gv) : GvNAMELEN(gv), 0 + )) + && *gvp == gv; +} + void Perl_get_db_sub(pTHX_ SV **svp, CV *cv) { @@ -6543,21 +6556,28 @@ Perl_get_db_sub(pTHX_ SV **svp, CV *cv) if ( svp && ((CvFLAGS(cv) & (CVf_ANON | CVf_CLONED)) || strEQ(GvNAME(gv), "END") - || ((GvCV(gv) != cv) && /* Could be imported, and old sub redefined. */ + || ( /* Could be imported, and old sub redefined. */ + (GvCV(gv) != cv || !S_gv_has_usable_name(aTHX_ gv)) + && !( (SvTYPE(*svp) == SVt_PVGV) && (GvCV((const GV *)*svp) == cv) - && (gv = (GV *)*svp) + /* Use GV from the stack as a fallback. */ + && S_gv_has_usable_name(gv = (GV *)*svp) ) ) )) { - /* Use GV from the stack as a fallback. */ /* GV is potentially non-unique, or contain different CV. */ SV * const tmp = newRV(MUTABLE_SV(cv)); sv_setsv(dbsv, tmp); SvREFCNT_dec(tmp); } else { - gv_efullname3(dbsv, gv, NULL); + sv_sethek(dbsv, HvENAME_HEK(GvSTASH(gv))); + sv_catpvs(dbsv, "::"); + sv_catpvn_flags( + dbsv, GvNAME(gv), GvNAMELEN(gv), + GvNAMEUTF8(gv) ? SV_CATUTF8 : SV_CATBYTES + ); } } else {
On Fri Nov 18 12:12:27 2011, SPROUT wrote: Show quoted text
> On Fri Nov 18 08:40:04 2011, SPROUT wrote:
> > On Fri Nov 18 08:35:14 2011, SPROUT wrote:
> > > On Thu Nov 17 21:26:17 2011, SPROUT wrote:
> > > > On Thu Nov 17 21:23:03 2011, SPROUT wrote:
> > > > > On Thu Nov 17 19:40:07 2011, SPROUT wrote:
> > > > > > I think that initial logic is faulty in all Perl versions.
> > Now
> > > I
> > > > > just
> > > > > > need to think of a workaround.
> > > > > > > > > > I believe that renaming the GV itself (the one bound to the
> ops)
> > > and
> > > > > inserting it into the symbol > > > > > table under its new name will solve the problem. I don’t know
> > > > whether
> > > > > there are any CPAN > > > > > modules that do that already. If I can’t find a way to do it
> in
> > > pure
> > > > > Perl....
> > > > > > > > Actually, it’s easy. The C code in perl is using gv_efullname: > > > > > > > > gv_efullname3(dbsv, gv, NULL); > > > > > > > > (with an e before fullname), so assigning another glob to it
> > (after
> > > > saving the slots) should do > > > > the trick (and then restore the slots).
> > > > > > I have a patch for you. It fixes #72368 as well in 5.14.
> > > > And I have just confirmed that it works in 5.8.8, too, so you can > > remove the skip from 07- > > debugger.t.
> > And you should be able to skip the workarounds in 5.15.5. I haven’t > merged the perl fixes > yet, but they are attached here in case you want to try things out > before I get to that.
The perl fixes are now integrated into blead as a7999c089, and will be in 5.15.5.
Subject: Re: [rt.cpan.org #69862] t/author-07-debugger.t fails with 5.14.1
Date: Sat, 19 Nov 2011 08:58:22 +0100
To: bug-namespace-clean [...] rt.cpan.org
From: Peter Rabbitson <ribasushi [...] cpan.org>
Father Chrysostomos via RT wrote: Show quoted text
> > The perl fixes are now integrated into blead as a7999c089, and will be in 5.15.5.
Thank you for the amazing and efficient work. I should bug core p5p devs with random perl bugs more often :) Cheers!
After 80e4e267 the debugger correctly works on all perl versions from 5.8.1 onwards. FC++
On Wed Dec 21 04:46:17 2011, RIBASUSHI wrote: Show quoted text
> After 80e4e267 the debugger correctly works on all perl versions from > 5.8.1 onwards. FC++
BTW, you can skip the debugger fixup altogether if $] > 5.015_004_9.
On Wed Dec 21 16:19:57 2011, SPROUT wrote: Show quoted text
> On Wed Dec 21 04:46:17 2011, RIBASUSHI wrote:
> > After 80e4e267 the debugger correctly works on all perl versions from > > 5.8.1 onwards. FC++
> > BTW, you can skip the debugger fixup altogether if $] > 5.015_004_9.
Good point, thanks!