Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: "use" dynamic module

by xdg (Monsignor)
on Dec 06, 2005 at 09:08 UTC ( [id://514374]=note: print w/replies, xml ) Need Help??


in reply to Re: "use" dynamic module
in thread "use" dynamic module

For a prepackaged approach, it might be worth considering UNIVERSAL::require. Its synopsis:

# This only needs to be said once in your program. require UNIVERSAL::require; # Same as "require Some::Module" my $module = 'Some::Module'; $module->require or die $@; # Same as "use Some::Module" BEGIN { $module->use or die $@ }

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://514374]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 09:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found