Can't locate Moo.pm in @INC

user3496654 picture user3496654 · Apr 25, 2014 · Viewed 12.1k times · Source

I am trying to run a .pm program in dzsoft perl editor. but i got this error

Can't locate Moo.pm in @INC (@INC contains: C:\Users\123\Desktop\ C:/Perl64/site/lib C:/Perl64/lib .) at UniNE.pm line 5.

My interpertor is ActivePerl-5.18.2.1802-MSWin32-x64-298023 how can I add moo.pm to lib?

Answer

Sobrique picture Sobrique · Apr 25, 2014

This error means you've got a line that says use Moo; and it can't find it. The first question is - have you installed 'Moo'? If not, then:

perl -MCPAN -e shell
install Moo

This may take a bit of faffing with ActivePerl, so you may want to try and use ppm instead. If you do definitely have it installed, then I would suggest the next port of call is to try and figure out where it ended up - search for Moo.pm in your local filesystem, and compare that against your @INC path. You may find permissions are the root cause, and it's unreadable by your perl user.