Depending on what a user specifies, I want to include different perl modules (e.g. foo.pm bar.mk etc). I only want to include them if they haven't already been inclulded. So I may have a variable $module that contains the module specified. I want to do something like:
if (!defined(%$module::)) { eval { require "${module}.pm"; } }
Of course the above code doesn't work. Can someone help with this? Thanks,
In reply to check symbol table w/ dynamic name by skerr1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |