develooper Front page | perl.perl5.porters | Postings from June 2012

[perl #112152] Deleting stashes confuses Carp stacktraces

Thread Next
From:
Father Chrysostomos via RT
Date:
June 8, 2012 18:01
Subject:
[perl #112152] Deleting stashes confuses Carp stacktraces
Message ID:
rt-3.6.HEAD-1554-1339203674-1471.112152-15-0@perl.org
On Mon Jun 04 11:13:01 2012, doy@tozt.net wrote:
> On Mon, Jun 04, 2012 at 03:01:30AM -0500, Jesse Luehrs wrote:
> > On Mon, May 21, 2012 at 06:02:56PM -0700, Father Chrysostomos via RT
> wrote:
> > > On Fri Mar 30 21:20:34 2012, doy@tozt.net wrote:
> > > > Carp assumes in several places that if caller() returns a valid
> > > >    result,
> > > > then it will include the package. This isn't true if that stash
> has
> > > > since been deleted (caller returns undef as the first result in
> that
> > > > case). The attached patch adds tests for this, and fixes it.
> > >
> > > I haven’t looked into it, but this patch fails for me:
> > >
> > > #   Failed test at t/stash_deletion.t line 43.
> > > #                   'blah at ../../lib/Carp.pm line 101.
> > > # '
> > > #     doesn't match '(?^:^blah at foo line 1)'
> > > FAILED at test 6
> >
> > It seems that caller was tweaked a bit in 5.16 to preserve a bit
> more
> > information, and this is not the first time by a long shot that this
> > sort of thing has happened. I've adjusted the tests a bit to be more
> > lenient, and this seems to work on all of the perl versions I've
> tested.
> > This patch also includes the various metadata bits to make
> > test_porting happy.
> >
> > -doy
> 
> And now that I have a commit bit, this is pushed to
> doy/carp_stash_deletion.

Are you going to apply this to blead yourself, or shall I go ahead?


-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=112152

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About