in reply to Re^2: dynamic loading of modules
in thread dynamic loading of modules
or put it into a BEGIN block of it's own:package SearchMachine; BEGIN { $mod1 = "/path/Mysearch.pm"; require qq($mod1); } 1;
All BEGIN blocks are executed first, in order, before any other code is even compiled. See perlmod, section BEGIN, CHECK, INIT and END. And, for the record, it's spelled dynamic loading ;-)package SearchMachine; BEGIN { $mod1 = "/path/Mysearch.pm"; } BEGIN { require qq($mod1); } 1;
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|