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

Re: do SUBROUTINE(LIST)

Thread Previous | Thread Next
From:
Zefram
Date:
October 26, 2009 15:31
Subject:
Re: do SUBROUTINE(LIST)
Message ID:
20091026223053.GR403@fysh.org
jesse wrote:
>It doesn't warn that it's deprecated as of 5.10.

It does if you have deprecation warnings enabled:

$ perl5.004 -we 'sub foo { } do foo()'
Use of "do" to call subroutines is deprecated at -e line 1.
$ perl5.10.0 -we 'sub foo { } do foo()'
Use of "do" to call subroutines is deprecated at -e line 1.

This has previously been considered sufficient warning.  It's only
recently that deprecation warnings have come to be displayed by default.

-zefram

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