Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: attempt to reload My_module.pm aborted

by prashanttekriwal (Novice)
on Apr 18, 2013 at 18:36 UTC ( #1029404=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1029404]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2018-01-17 11:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (198 votes). Check out past polls.

    Notices?