develooper Front page | perl.perl5.porters | Postings from January 2012

[perl #108778] no warnings "module name"

Thread Next
Father Chrysostomos via RT
January 23, 2012 14:08
[perl #108778] no warnings "module name"
Message ID:
On Sun Jan 22 12:52:17 2012, sprout wrote:
> perldiag lists some warnings in the ‘overload’ category.  What is not
>    documented anywhere is that this is a custom category registered by
> The result:
> $ ./perl -Ilib -e 'use warnings; no warnings "overload"; ...'
> Unknown warnings category 'overload' at -e line 1
> BEGIN failed--compilation aborted at -e line 1.
> If I load first, it works fine.
> While this could be argued as not being a bug, it just doesn’t feel
>    right.  It should be possible to disable a warnings category before
>    it is registered, because usually the code disabling the warnings
>    category doesn’t know when it is registered.

Also, ‘use warnings’ doesn’t enable overload warnings unless
is already loaded.  So BEGIN { $^W = 1 } will actually give *more*
warnings than ‘use warnings; use overload ...’.  See also #108870.


Father Chrysostomos

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