I think you misunderstood what Module::CoreList is for: it tells you about the "core" modules, i.e. the ones that are included by default with any distribution of perl. It's often useful to know when a paticular core module entered the core, if you're trying to support older versions of perl.

A common way of finding out if you have a module is:

perl -MSome::Module -e'print $Some::Module::VERSION, "\n"'
If you get a version number, it's there, if not, you don't have it.

From within perl code, I'd be inclined to require it and trap the error to find out if the require failed. Something like this:

use Carp; my $module = "CGI"; eval "require $module"; if ($@) { carp "Problem with require of $module: $@"; } else { print "We have $module installed\n"; }


In reply to Re: CoreList stuff by doom
in thread CoreList stuff by neutron

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.