There are two things I might suggest:

In the output you provided you gave perl -c /home/henry/gitr/MAS/lib/MAS/Global.pl as an example to show that perl could find it; however, that command would only check the syntax of the file name you provided (the full path to the module). By running perl -c ./t/8bit.t you have perl check the syntax of the test file (it's perl code too, after all), and if it can see the module it should pass.

prove's -I option adds a library path for prove to include when running. prove's man page includes this comment about @INC:

@INC
prove introduces a separation between "options passed to the perl which runs prove" and "options passed to the perl which runs tests"; this distinction is by design. Thus the perl which is running a test starts with the default @INC. Additional library directories can be added via the "PERL5LIB" environment variable, via -Ifoo in "PERL5OPT" or via the "-Ilib" option to prove.
It looks as if using the -I option might add the given path you need to have the test complete successfully.

Hope that helps.


In reply to Re: prove can't find my module, even though its directory is in $INC[0] by atcroft
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.