The call to badcall() will see that that module's warnings are enabled. Looking at the code in use warnings and use warnings::register, I see that adding a category will extend the mask for 'all' to include the new bit, but it can't do a thing about the existing values of ${^WARNING_BITS}. Shouldn't that new bit still be off in this scope?use warnings; # implies 'all' use Some::Module; # does a warnings::register Some::Module::badcall();
In reply to How does this code work (warnings.pm)? by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |