in reply to Re: How not to check if a module is installed
in thread How not to check if a module is installed
For a real module, if warnings are on, that is likely to provoke "subroutine redefined" warnings.
The example is intentionally simplistic. The real case was "eval require" in a subroutine in a module that later wound up being used inside a loop. It's not that I don't know how to work around this issue -- it just never occurred to me that this was the behavior of require.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
|---|