develooper Front page | perl.perl5.porters | Postings from June 2010

Re: Why are subs matching /^[\W_]$/ global?

Thread Previous | Thread Next
June 4, 2010 09:29
Re: Why are subs matching /^[\W_]$/ global?
Message ID:
On Fri, Jun 04, 2010 at 04:09:14PM +0000, Ævar Arnfjörð Bjarmason wrote:
> Would those sort of warnings be unreasonable for core inclusion? I
> don't think perlcritic is a good place to put it, because in these
> cases the core is claiming that something is undefined/reserved. So
> it's different from "you used the wrong indentation style", which is
> the sort of thing I think perlcritic should be used for.

IMO, anything that has to do with *syntax* - and especially stylistic
issues (which includes "my $x if 0" and one character subs - but also
"print interpreted as a function" and qw [foo, bar #baz]), are more
suitable for a linter; anything that has to do with a programs state
belong to the core. 

And I really dislike new warnings for existing constructs that haven't
changed meaning.

Of course, that's just my opinion.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About