I’ve been using Getopt::Long
and at one point in the code, where I think it should warn()
, it doesn’t, unless I run with -w
.
Upon inspection, the (Getopt::Long) code directly checks the value of $^W
. But I used use warnings;
.
That is, the program runs differently with perl program.pl
than with perl -w program.pl
, even though program.pl
contains use warnings;
and/or use warnings 'all;
So my question is this: Does checking $^W
reflect any use warnings
(pragmas?) statements?
One way or the other, the documentation isn’t clear. Unless I’ve misunderstood.
1