This mistake is not caught by warnings,
Sure it is
$ perl -Mstrict -Mwarnings -le " our $shy => (); " $ perl -Mstrict -Mwarnings -le " our $shy => (0); " $ perl -Mstrict -Mwarnings -le " our $shy => (1); " $ perl -Mstrict -Mwarnings -le " our $shy => (2); " Useless use of a constant (2) in void context at -e line 1. $ perl -Mstrict -Mwarnings -le " our $shy => []; " Useless use of anonymous list ([]) in void context at -e line 1. $ perl -Mstrict -Mwarnings -le " our $shy => {}; " Useless use of anonymous hash ({}) in void context at -e line 1. $ perl -Mstrict -Mwarnings -le " our $shy => q{}; " Useless use of a constant ("") in void context at -e line 1.
In reply to Re: Detecting 'our $foo => 1' mistake?
by Anonymous Monk
in thread Detecting 'our $foo => 1' mistake?
by perlancar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |