in reply to Require a Modul that produced a error before
require won't do anything the second time around since the module has been marked as included the first time around (even though it didn't load completely).
You could clear the %INC entry on failure, but that could lead to very odd (i.e. hard to debug) errors.
eval { require Module }; print $@ ? "Error\n" : "Success\n"; # Error { local $, = ", "; local $\ = "\n"; print keys %INC; } eval { require Module }; print $@ ? "Error\n" : "Success\n"; # Success
# Module.pm for;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Require a Modul that produced a error before
by Outaspace (Scribe) on Oct 12, 2006 at 22:58 UTC | |
by ikegami (Patriarch) on Oct 15, 2006 at 20:50 UTC | |
by Outaspace (Scribe) on Oct 16, 2006 at 21:57 UTC |