简体   繁体   中英

Trying to learn to install Perl module

I have been using Perl for about 4 hours. Suffice to say, I don't know anything. However, I'm trying to run a file someone else wrote. They sent me the.pl file and a.pm module that it needs to run. I'm stuck trying to get the module installed.

When I run the file:

$ C:\Users\NAME\perl C:\location\reliability.pl

I get this:

Can't locate Krippendorff.pm in @INC (you may need to install the Krippendorff module) (@INC contains: C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib) at C:\location\reliability.pl line 4. BEGIN failed--compilation aborted at C:\location\reliability.pl line 4.

Since I don't really know what I'm doing, I'm struggling to figure out how to install the.pm file to a directory. I tried installing from cpan, but I think that only works for modules hosted on that site. I don't know the language well enough to interpret other posts.

Can someone explain what I need to do like I'm 5 so I can get this code running? I'm using Strawberry, if that helps. TIA!

It depends where you put the Krippendorff module. If it is in the same directory try:

perl -I C:\location\ C:\location\reliability.pl

The -I is the include directory to look at for additional modules like Krippendorff.

You don't say were you installed Krippendorff or how which would be useful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM