4

I'm using strawberry perl to tail a file using use File::Tail.

I got the error message of the following:

Can't locate 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 .) at tailing.perl line 5. BEGIN failed--compilation aborted at tailing.perl line 5.

Three packages contains lib:

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

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

Used cpan install, but the installation failed.

Paul
  • 954
  • 19
  • 34
  • This was just reported as a ticket to the distribution's bug queue: https://rt.cpan.org/Ticket/Display.html?id=103771 If you'd filed it when you asked the question, it might have been fixed four years ago. :p – Ether Apr 16 '15 at 16:40

3 Answers3

11

The current File::Tail distribution on CPAN has never passed its test suite on Windows. Steffen Mueller submitted a patch for Windows 5 years ago, but it has never been incorporated into the distribution on CPAN.

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

perl Makefile.PL
dmake
dmake test
dmake install
mob
  • 117,087
  • 18
  • 149
  • 283
0

That's the 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

So I wouldn't recommend it.

Axeman
  • 29,660
  • 2
  • 47
  • 102
0

Not all modules are part of the standard module set. You should check the Perldoc Perl documentation. This contains all the standard Perl modules. If a module isn't in there, you have to install it.

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

You can also look at module reviews at CPAN Ratings.

David W.
  • 105,218
  • 39
  • 216
  • 337