[Melbourne-pm] Postfix conditionals and creating lexicals
david.warring at gmail.com
Thu Jul 12 23:46:34 PDT 2012
Rather than losing a whole raft of language constructs, I'd prefer to be
able to tell Perl to behave sanely.
Maybe the behaviour could be controlled and modified as a
use feature 'no_implied_static'; # just for example
my $foo if 0; # now behaves sanely
On Fri, Jul 13, 2012 at 1:40 PM, Mathew Robertson <
mathew.blair.robertson at gmail.com> wrote:
>> looks like targetting the specific idiom:
>> my $foo ... if 0
>> should warn about any
>> my $foo ... if ...
>> > So while we can argue about whether or not its a bug
>> unintended dis-recommended 'features' are bugs, categorically
>> > If I get around to it I'll open a bug report, even if its just asking
>> > for better warnings. I doubt I'll have time to work up a patch myself.
>> If can detect the pattern with 'use warnings', I guess not too hard
>> to make it a syntax error in the core. Maybe don't want to break
>> existing abuse of it, so leave it in use warnings / use strict.
> Given that recent releases are specifically deprecating some
> functionality, I dont see why this shouldn't be upgraded from warning, to
> error. ie: any syntax of
> my .... if ...
> local .... if ...
> our ... if ...
> and dont forget 'unless'.
> Melbourne-pm mailing list
> Melbourne-pm at pm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Melbourne-pm