in reply to Re^2: 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]

> My example showing how Perl could find the module was actually perldoc -l which correctly identified the source as /home/henry/gitr/MAS/lib.

Better don't count on that, AFAIR is perldoc using another mechanism to locate documentation.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

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

Replies are listed 'Best First'.
Re^4: prove can't find my module, even though its directory is in $INC[0]
by LanX (Saint) on Dec 15, 2025 at 21:16 UTC
    Rather try this
    $ perl -MMAS::Global -e0

    And compare the error message (if it occurs)

    Can't locate MAS/Global.pm in @INC (you may need to install the MAS::G +lobal module) (@INC entries checked: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/ +5.38.2 ... YADDA YADDA ... /usr/local/lib/site_perl). BEGIN failed--compilation aborted.

    next step would be to dump @INC inside a BEGIN{ } right before the use MAS::Global in order to spot differences to successful imports.

    perl -e'BEGIN {warn join " ",@INC};use MAS::Global'

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery