Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Install and then load missing modules with in a script

by dmitri (Priest)
on Jul 20, 2016 at 19:33 UTC ( [id://1168171] : note . print w/replies, xml ) Need Help??


in reply to Install and then load missing modules with in a script

I see two issues:
  1. You're looking for eval "require $mod";. See perldoc -f require for more info.
  2. Thinko: after system() call (whose return value you should check, btw), you need to require the module you just installed.
  • Comment on Re: Install and then load missing modules with in a script