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 > overload.pm. > > 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 overload.pm 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 overload.pm is already loaded. So BEGIN { $^W = 1 } will actually give *more* warnings than ‘use warnings; use overload ...’. See also #108870. -- Father ChrysostomosThread Next