[Buffalo-pm] Test if module is loaded

Joshua Johnson joshpauljohnson at gmail.com
Tue Dec 8 09:53:23 PST 2009


Hello all!

Is there a way to test if a perl module is loaded? I'm working on a
small project where I load some modules dynamically as part of a
configuration and then "use" them at that time. I don't get any errors
but I just feel dirty loading a module that may have already been
loaded. So, if at the top of the file I do:

use Whatever::Project::MyStuff;

Can I find out later if Whatever::Project::MyStuff is already loaded?
I suppose it may not matter or have any kind of performance impact but
now I'm just curious to know if it can be done.

Thanks,
Josh J


More information about the Buffalo-pm mailing list