http://www.perlmonks.org?node_id=1029404


in reply to attempt to reload My_module.pm aborted

Hi all,

Thanks for the replies.

Actually I don't know how the users are using their script even though the module is failing to load.
Since it has been working earlier with perl5.8.8, I had to make it work for perl 5.14 as it is really difficult to figure out where the first attempt is failing.

I was able to get around the issue by doing this:
eval { require Module; }; my $error = $@; if ($error && $error =~ /attempt to reload/i){ delete $INC{'Module'}; require Module; } else{ die $error; }
and its working fine as it was earlier.

I know this seems to be a very tedious hack but then there is no other way I could think of since I can't comment the 'use' statement.

I appreciate all the replies I got.

Thanks again,
Prashant