require 'MAS::Global';

Just to hammer the point home, it is the format of this line which is the problem, not the line itself. By enclosing the module name in quotes it is no longer a bareword and therefore perl looks for a file with that exact name which of course it does not find because it does not exist. If you had omitted the quotes (as you did in the use statement) it would all have been fine. Here's a trivial illustration using a core module as an example:

$ perl -e 'use Fcntl; require "Fcntl";' Can't locate Fcntl in @INC (@INC contains: /usr/local/lib64/perl5 /usr +/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vend +or_perl /usr/lib64/perl5 /usr/share/perl5) at -e line 1. $ perl -e 'use Fcntl; require Fcntl;' $

See how (and why) the first one with the quotes fails but the second one without the quotes succeeds? It's the same even without the use statement but I have left it in there to mirror your use case.


🦛


In reply to Re^2: prove can't find my module, even though its directory is in $INC[0] by hippo
in thread prove can't find my module, even though its directory is in $INC[0] (Solved) by HenryLaw

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.