develooper Front page | perl.perl5.porters | Postings from October 2009

Re: do SUBROUTINE(LIST)

Thread Previous | Thread Next
From:
Abigail
Date:
October 26, 2009 15:35
Subject:
Re: do SUBROUTINE(LIST)
Message ID:
20091026223541.GA11343@almanda
On Mon, Oct 26, 2009 at 06:26:13PM -0400, jesse wrote:
> 
> 
> 
> On Mon, Oct 26, 2009 at 10:17:22PM +0000, Zefram wrote:
> > "do SUBROUTINE(LIST)" to call a subroutine has been deprecated for a
> > long time (at least since 5.004).  Can we remove it now?
> 
> It doesn't warn that it's deprecated as of 5.10. If we want it gone,
> 5.12 should warn about it at the very least.

I disagree with the first statement:

  $ /opt/perl/5.6.2/bin/perl -we 'sub foo {1;} do foo ()'
  Use of "do" to call subroutines is deprecated at -e line 1.
  $ /opt/perl/5.8.8/bin/perl -we 'sub foo {1;} do foo ()'
  Use of "do" to call subroutines is deprecated at -e line 1.
  $ /opt/perl/5.10.1/bin/perl -we 'sub foo {1;} do foo ()'
  Use of "do" to call subroutines is deprecated at -e line 1.


Abigail

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