in reply to Re: Checking and installing a perl module
in thread Checking and installing a perl module
This will check whether a module is installed....But how to install it from the script if it is not installed??BEGIN { eval('use abc::fdj'); if($@) { die "You need to install ModuleName...\n" if $@; #`perl -MCPAN -e shell | install abc::def`; # `install abc::def`; } else { print "The module is installed\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Checking and installing a perl module
by ikegami (Patriarch) on Jun 11, 2009 at 13:36 UTC |