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

Re: Perl debugger vs. Sub::Name

Thread Previous | Thread Next
Tim Bunce
November 4, 2010 07:07
Re: Perl debugger vs. Sub::Name
Message ID:
On Fri, Oct 15, 2010 at 01:29:50PM -0700, Chip Salzenberg wrote:
> On Fri, Oct 15, 2010 at 8:27 AM, Tim Bunce <> wrote:
> > On Fri, Oct 15, 2010 at 04:00:22AM -0700, Chip Salzenberg wrote:
> >> > This appears to be a duplicate of
> >> >
> >>
> >> 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.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About