develooper Front page | perl.perl5.porters | Postings from July 2001

Re: caller() confused by & prototype

Thread Previous
From:
Paul Johnson
Date:
July 23, 2001 13:56
Subject:
Re: caller() confused by & prototype
Message ID:
20010721134916.B3746@pjcj.net
On Sat, Jul 21, 2001 at 07:12:30AM -0400, Jeff 'japhy/Marillion' Pinyan wrote:
> On Jul 21, Michael G Schwern said:
> 
> >caller() appears to be confused by the & prototype and reports the
> >line where the function call *ended* rather than where it starts.
> 
> This also happens when you send sub { ... } as an argument to a
> function.  Someone has already posted a bug about it.  (He was willing to
> pay the porter who fixed it!)

That's exactly what's happening here.  The existing bug id is
20010622.008.

Robert Spier pointed it out to me when I fixed another line numbering
problem recently, but this case is slightly different.  In the bug I
fixed the correct information was in the optree, and just had to be
found.  In this case the line numbers you see are those which are in the
optree.

I was planning on investigating, but haven't found time.  If you fix it
(Michael) it might reduce your exposure when the tests are complete ;-)

-- 
Paul Johnson - paul@pjcj.net
http://www.pjcj.net

Thread Previous


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