This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #124280] don't warn for 'my $foo, *bar'
authorLukas Mai <l.mai@web.de>
Fri, 20 Nov 2015 23:16:31 +0000 (00:16 +0100)
committerLukas Mai <l.mai@web.de>
Fri, 20 Nov 2015 23:26:10 +0000 (00:26 +0100)
commit4639a3a7d1d9f85f2e8510b689a8e047b15ed452
treeb04364e6c328184657c1bb4a8db4ae14ee6be409
parent7c294235c2f28d1f9762b654787d29331165f8fa
[perl #124280] don't warn for 'my $foo, *bar'

It doesn't make sense to warn 'Parentheses missing around "my" list' if
adding the parens causes a syntax error (you can't declare typeglobs).

But it does make sense to warn for 'local $foo, *bar' because typeglobs
can be localized.

Thus modify the heuristic to only warn for '*' if we're not lexically
declaring something.
op.c
t/lib/warnings/op