Cybris has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
I'm trying to repair an old script that uses Class::Util (from the old OOTools package) so that it works with newer Perl versions. Unfortunately, I'm running into a bug because some perl behaviour has changed in 5.10 (https://rt.cpan.org/Public/Bug/Display.html?id=29824))
Now, the problem seems to be that that technique of checking whether a package exists no longer works in 5.10 and above. So, my question is: how do you check if any arbitrary package exists? Without knowing the names of any functions in that package?
Unfortunately my legacy script is too big to rewrite (of course, I didn't even write it in the first place, but "inherited" it).
Your help would be very appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Check if a package exists
by Corion (Patriarch) on Sep 11, 2010 at 22:03 UTC | |
|
Re: Check if a package exists
by BrowserUk (Patriarch) on Sep 11, 2010 at 23:09 UTC | |
|
Re: Check if a package exists
by Khen1950fx (Canon) on Sep 12, 2010 at 03:49 UTC | |
|
Re: Check if a package exists
by Anonymous Monk on Sep 12, 2010 at 03:53 UTC | |
|
Re: Check if a package exists
by JavaFan (Canon) on Sep 13, 2010 at 21:42 UTC |