Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: attempt to reload My_module.pm aborted

by prashanttekriwal (Novice)
on Apr 18, 2013 at 18:36 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1029404]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-24 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found