Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 wandering the Monastery: (8)
As of 2016-08-25 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (354 votes). Check out past polls.