0

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?

user3496654
  • 101
  • 1
  • 3
  • 12

2 Answers2

5

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.

Sobrique
  • 52,974
  • 7
  • 60
  • 101
3

I should install Moo module first. Try from cmd-line: cpan Moo

Osmin
  • 426
  • 3
  • 12
  • 1
    I have got CPAN installs working in ActiveState, but it often requires a bit of faffing, as you tend to be missing some key elements - such as `make`. It's not impossible to get working, but I'd generally suggest starting with `ppm` which come with ActiveState as a first port of call. – Sobrique Apr 25 '14 at 10:11