Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: dynamic loading of modules

by strat (Canon)
on Aug 28, 2006 at 08:23 UTC ( #569946=note: print w/replies, xml ) Need Help??


in reply to dynamic loading of modules

there is a "workaround": either move $mod1 into the begin-block:
package SearchMachine; use warnings; use strict; BEGIN { my $mod1 = "/path/MySearch.pm"; require $mod1; }
or move the require out of the begin block:
package SearchMachine; use warnings; use strict; my $mod1 = "/path/MySearch.pm"; require $mod1;

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2016-09-30 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (566 votes). Check out past polls.