good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Could it be that the modules that you are reloading, contain a use warnings; themselves, which would override the no warnings 'redefine'; inside the eval?
If that's the case, I wouldn't know of a simple solution to this problem, other than reading the contents of the file to be required into a variable (e.g. $source) and then doing a:
This is pretty yucky, though. And may fail when the required file itself uses or requires other files. I guess more rigorous methods such as adding a subroutine handler to @INC or stealing CORE::require would be methods for handling this reliably. Or maybe simplify matters by installing a __WARN__ handler that would filter out the redefined warnings? Hope this helps. Liz In reply to Re: Reloading modules- suppressing warnings works sometimes?
by liz
|
|