[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: lexical warnings upgrade
> carp "WARNING: calling ${pkg}->new since ${pkg}->TIESCALAR is missing"
> if $^W;
>
>I didn't have time to check whether these were controlling warnings from
>a distance so I've left well alone
> lib/DB.pm
> lib/Dumpvalue.pm
> lib/Test.pm
> lib/diagnostics.pm
> lib/dumpvar.pl
> lib/perl5db.pl
I set $^W=1 in diagnostics because I assumed that if you wanted
diagnostics, it didn't make a lot of sense to do this without -w
turned on. The code's comments reveal this:
$^W = 1; # yup, clobbered the global variable; tough, if you
# want diags, you want diags.
The others you mention seem to disable it, not enable.
Although there is a case in lib/Text.pm that is commented
out which turns it on. Also, one you didn't mention (apart
from saying you didn't touch it) was lib/CPAN.pm, which also
sets $^W to 1 (within a local).
--tom
- References to:
-
paul.marquess@bt.com
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]