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]

Out of curiosity, what does your 'package' statement in the module look like? Is it something like package MAS::Global; , or package Global;?

I ask because I did a quick test of some code I was working on recently. My code was under ./lib/My/Particle/Moveable.pm, and my test ran correctly if I used package My::Particle::Moveable; but not if I did package Moveable;. (I remember there was some reason for doing it one way and not the other, but I can't remember it at the moment.)

Hope that helps.

Replies are listed 'Best First'.
Re^4: prove can't find my module, even though its directory is in $INC[0]
by choroba (Cardinal) on Dec 15, 2025 at 09:36 UTC
    That's weird, because using a bareword replaces the :: with a slash, so the error should be
    Can't locate MAS/Global.pm in @INC (you may need to install the MAS::G +lobal module) (@INC contains: ... # ^ # | # slash

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re^4: prove can't find my module, even though its directory is in $INC[0]
by HenryLaw (Novice) on Dec 15, 2025 at 09:59 UTC
    It's package MAS::Global;