Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: prove can't find my module, even though its directory is in $INC[0]

by hippo (Archbishop)
on Dec 17, 2025 at 13:35 UTC ( [id://11166955]=note: print w/replies, xml ) Need Help??


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

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.


🦛

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11166955]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2026-04-12 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.