develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #2726] Prototypes defined too late - warning for recursive subroutines

Thread Next
From:
Peter Martini via RT
Date:
August 6, 2013 07:36
Subject:
[perl #2726] Prototypes defined too late - warning for recursive subroutines
Message ID:
rt-3.6.HEAD-2552-1375774562-199.2726-15-0@perl.org
On Mon Dec 03 05:02:36 2012, nicholas wrote:
> On Sun, Nov 25, 2012 at 01:33:33PM -0800, Father Chrysostomos via RT 
wrote:
> 
> > > Ah, barewords make a strong argument:
> > > 
> > > sub STDOUT {
> > >   # Do something - log the output?
> > >   print STDOUT @_;
> > >   undef;
> > > }
> > > print STDOUT "Test\n";
> > > 
> > > That's persuasive enough for me to drop the argument, much as I 
wish it
> > > could be changed.
> > 
> > I think this is the appropriate place to bring up the joke about the
> > Irishman giving directions. :-)
> 
> Yes. :-(
> 
> 
> Given that where we are right now is that bareword parsing behaves as 
above,
> do we have any tests for it? It strikes me as something obscure we 
should
> test, just to be sure that we don't change it without realising.
> 
> I'm not sure where such tests should go.
> 
> Nicholas Clark
> 

For the sake of argument, and to clean up an old RT that's ultimately 
just a doc fix, how about the attached patch?

I'm more than happy to see an alternate patch with better wording, or in 
a better spot in perlsub, if it knocks this ticket off of the RT queue 
:-)

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

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