Strawberry perl: none File :: Tail.pm. CPAN could not install the module

I use strawberry perl to tail the file using File::Tail .

I got an error message:

Cannot find file /Tail.pm in @INC (@INC contains: c: \ strawberry \ perl \ lib C: / strawberry / perl / site / lib C: / strawberry / perl / vendor / lib C: / strawberry / Perl / lib.) in the line tailing.perl 5. BEGIN failed - compilation was canceled on the line tailing.perl 5.

Three packages contain lib:

  • c:\strawberry\perl\lib
  • C:\strawberry\perl\site\lib
  • C:\strawberry\perl\vendor\lib

where c:\strawberry\perl is the root directory of the perl installation.
I checked all three packages, but could not find File/Tail.pm

Using cpan install, but the installation failed.

+4
source share
3 answers

In the current File::Tail distribution on CPAN, he never transferred his test suite to Windows . Steffen Mueller introduced the patch for Windows 5 years ago, but it was never included in the CPAN distribution.

His patch is available here , and hallelujah, it works for me. Just unzip it anywhere and run the usual

 perl Makefile.PL dmake dmake test dmake install 
+11
source

This is a great thing about Strawberry Perl.

 C:\Users\me > cpan File::Tail 

Of course I got:

 Test Summary Report ------------------- t/10open.t (Wstat: 0 Tests: 6 Failed: 4) Failed tests: 3-6 t/20tail.t (Wstat: 0 Tests: 3 Failed: 3) Failed tests: 1-3 Parse errors: Bad plan. You planned 7 tests but ran 3. t/30name_change.t (Wstat: 0 Tests: 1 Failed: 1) Failed test: 1 Parse errors: Bad plan. You planned 2 tests but ran 1. Files=3, Tests=10, 32 wallclock secs ( 0.03 usr + 0.09 sys = 0.12 CPU) Result: FAIL Failed 3/3 test programs. 8/10 subtests failed. dmake.EXE: Error code 255, while making 'test_dynamic' MGRABNAR/File-Tail-0.99.3.tar.gz C:\strawberry\c\bin\dmake.EXE test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports MGRABNAR/File-Tail-0.99.3.tar.gz Running make install make test had returned bad status, won't install without force 

Therefore, I would not recommend it.

0
source

Not all modules are part of the standard set of modules. You should check the Perloc Perl documentation. It contains all the standard Perl modules. If the module is not there, you must install it.

As Axeman said, you can use the cpan command to install any module. Just type cpan at the command line, and when you get the cpan> prompt, type install File::Tail . It should automatically install everything for you, including prerequisites.

You can also see module reviews on CPAN Ratings .

0
source

Source: https://habr.com/ru/post/1381374/


All Articles