develooper Front page | perl.perl5.porters | Postings from November 2010

Re: Perl debugger vs. Sub::Name

Thread Previous | Thread Next
From:
Tim Bunce
Date:
November 4, 2010 07:07
Subject:
Re: Perl debugger vs. Sub::Name
Message ID:
20101104133846.GG2332@timac.local
On Fri, Oct 15, 2010 at 01:29:50PM -0700, Chip Salzenberg wrote:
> On Fri, Oct 15, 2010 at 8:27 AM, Tim Bunce <Tim.Bunce@pobox.com> wrote:
> > On Fri, Oct 15, 2010 at 04:00:22AM -0700, Chip Salzenberg wrote:
> >> > This appears to be a duplicate of
> >> > https://rt.cpan.org/Public/Bug/Display.html?id=50524
> >>
> >> My patch is shorter, only runs when the debugger is actually enabled
> >> and %DB::sub is being populated, uses gv_efullname() correctly,
> >> removes the old incorrect data from %DB::sub
> >
> > The old name isn't "incorrect" as such.  I'm not at all sure it's
> > appropriate for subname to remove the old name (especially if the CV
> > isn't anon).
> 
> Agreed that's questionable if it's not anon.  Perhaps it should copy,
> rather than deleting, if name !~ /__ANON__/.

Better to use CvANON(cv)?

But is there a good reason to delete entries from %DB::sub?
Symbol::delete_package doesn't, for example. I can see that it would be
appealing as the 'tidy' thing to do, but I'm concered that we may be
throwing away information that might prove useful. Especially if the
sub has been called/profiled with the previous name.

Tim.

Thread Previous | 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