in reply to Re: Load all modules in directory
in thread Load all modules in directory
. Here is the current non-working thing that I'm trying:Undefined subroutine &main::webcast_header called at multi_reporter.pl + line 133
The module that is being called works just fine under a "use" directive. Why might the import not be working? -C P.S. removing the .pm will make this thing barf on the "require".BEGIN { $mod_path="/home/tboyd/lib/site_perl/5.6.1/Tools/"; unshift @INC, $mod_path; my @mods = glob("$mod_path/*"); for (@mods) { s/.*\/(\w+\.pm)$/$1/gi; require $_; $_->import; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Load all modules in directory
by ysth (Canon) on Dec 11, 2003 at 05:13 UTC |