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

Re: [perl #122196] why are control-flow keywords confused with subroutines?

Thread Previous | Thread Next
From:
David Nicol
Date:
July 1, 2014 04:52
Subject:
Re: [perl #122196] why are control-flow keywords confused with subroutines?
Message ID:
CAFwScO_4Y75gL4u697O60OVaN5=dy9rM2Z08qe0-tTCLf7y0Tg@mail.gmail.com
On Sun, Jun 29, 2014 at 9:51 PM, Linda Walsh <perlbug-followup@perl.org>
wrote:

>
> use constant { next=>1, continue=>2 };
>

the usual practice I've seen is to avoid the collisions by using all-caps
constants, or prefix my_ or something. &next and &continue like the warning
suggests works too.

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