DreamT has asked for the wisdom of the Perl Monks concerning the following question:
But, I've noticed that it doesn't work in some cases, for example, when using$Module_is_installed = "N"; eval { require Module::Module; }; if (!($@)) { $Module_is_installed = "J"; } if ($Module_is_installed eq "J") { # Do stuff }
, it doesn't work, telling me that there's a syntax error. If I switch to "use", it tells me that it can't locate Mail/Sendmail.pm.require Mail::Sendmail 0.75;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Check if module is installed
by keszler (Priest) on Nov 16, 2009 at 10:38 UTC | |
by DreamT (Pilgrim) on Nov 16, 2009 at 11:08 UTC | |
by DrHyde (Prior) on Nov 16, 2009 at 11:32 UTC | |
by JavaFan (Canon) on Nov 16, 2009 at 11:46 UTC | |
by DrHyde (Prior) on Nov 17, 2009 at 10:36 UTC | |
|
Re: Check if module is installed
by biohisham (Priest) on Nov 16, 2009 at 10:51 UTC | |
|
Re: Check if module is installed
by Fox (Pilgrim) on Nov 16, 2009 at 14:47 UTC | |
|
Re: Check if module is installed
by bichonfrise74 (Vicar) on Nov 16, 2009 at 19:01 UTC | |
|
Re: Check if module is installed
by bart (Canon) on Nov 16, 2009 at 13:57 UTC | |
|
Re: Check if module is installed
by hecroce (Friar) on Nov 17, 2009 at 00:41 UTC | |
|
use Module::Load::Conditional
by gnosti (Chaplain) on Nov 17, 2009 at 22:55 UTC |