http://qs321.pair.com?node_id=570377

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How can I find out if I have the below module in my Windows 2000?

use Mail::Sendmail;

I opened up ppm and not sure how to check from there because the help command doesnt say anything about what modules I have in my Perl 5.8.6

Replies are listed 'Best First'.
Re: Find if I have module
by borisz (Canon) on Aug 30, 2006 at 13:18 UTC
    No news is good news ;-)
    perl -MMail::Sendmail -e1
    Boris
Re: Find if I have module
by ww (Archbishop) on Aug 30, 2006 at 13:25 UTC
    not the clearest of labeling, but ppm help DOES mention query... eg:
    c:\ppm ppm> query Mail
    should return a list of all modules beginning with Mail...

    Update to make explicit what was thought to be obviously implicit:  
    " return a list of all locally installled modules beginning..."

Re: Find if I have module
by planetscape (Chancellor) on Aug 30, 2006 at 14:19 UTC
Re: Find if I have module
by duff (Parson) on Aug 30, 2006 at 14:00 UTC

    Not an answer to your question (you've already gotten those), but you might want to consider using Strawberry Perl as you'll have access to CPAN as you would on a normal unixish system.

Re: Find if I have module
by ChrisS (Monk) on Aug 30, 2006 at 17:05 UTC
    Try the technique listed here in its original context. Basically, you can try this:
    use ExtUtils::Installed; my $inst = ExtUtils::Installed->new(); my @missing = $inst->validate("File::BaseName"); # note the improper capitalization print @missing;
    In this case, the @missing array shows:
    File::BaseName is not installed...
    The validate method returns a list of the missing files. Some of the other methods could help, too.
Re: Find if I have module
by satchm0h (Beadle) on Aug 30, 2006 at 19:50 UTC
    eval to the rescue...
    eval 'require Mail::Sendmail'; warn "No Love ($@)" if ($@);

    ...stumbling down the path toward enlightenment
Re: Find if I have module
by jacques (Priest) on Aug 31, 2006 at 04:23 UTC
    This is a good way.
    use HTML::Perlinfo::Modules; my $m = HTML::Perlinfo::Modules->new(); $m->print_modules( show_only=>qr/Mail::Sendmail/ );