The sequence require $module doesn't work if $module contains
colons. I think there's another node here somewhere that I wrote to show how
to do this with the right BEGIN{} block around it. But super search
isn't super enough for me to find it quickly.
-- Randal L. Schwartz, Perl hacker | [reply] |
eval "require $module";
if $module contains colons
| [reply] [d/l] [select] |
except that (at least in my program) my module name was determined after reading in a file at runtime. It's easy enough to do if you push the path onto the @INC. Anyway, a quick split for colons would take care to push yet another path on the poor @INC :-O so the end justifies the means.
| [reply] |