[Perl-unix-users] Checking Perl Module installed - How?

2005-07-27 Thread Arijit Das
Hi,   How can I check if a Perl Module is installed in my System from a Perl Program?   I want to do something like this:   #!/usr/local/bin/perl   if () {     use Quota; }     Any help is appreciated.   Thanks, Arijit     Start your day with Yahoo! - make it your home page _

Re: [Perl-unix-users] Checking Perl Module installed - How?

2005-07-27 Thread Philip M. Gollucci
Arijit Das wrote: How can I check if a Perl Module is installed in my System from a Perl Program? #!/usr/local/bin/perl if () { use Quota; } my $has_quota = eval { require Quota; } ? 0 : 1; if ($has_quota) { require Quota; ... } else { ## not installed; } END

RE: [Perl-unix-users] Checking Perl Module installed - How?

2005-07-27 Thread Darrell Gammill
Title: Message sub CheckLWP { # The following eval/if combination equates to a try/catch combination in C++     eval {     require LWP;     };     if ($@) {     #warn $@;     my ($bad_module) = $@ =~ m/Can't locate (.+?).pm in [EMAIL PROTECTED]/;     print "Failed to load P