Subject: | File-Tail-Multi-0.1 |
Date: | Tue, 25 Nov 2008 23:06:26 +0100 |
To: | bug-File-Tail-Multi [...] rt.cpan.org |
From: | WOLfgang Schricker <wols [...] wols.org> |
Distribution: File-Tail-Multi-0.1
Perl version: v5.8.8 built for i686-linux
Operating System: Linux 2.6.25-gentoo-r8 i686 GNU/Linux
#-----8<-----8<-----
#!/usr/bin/perl -w
use strict;
use File::Tail::Multi;
my $tail = File::Tail::Multi->new();
exit(0);
#-----8<-----8<-----
gives:
Use of uninitialized value in numeric lt (<) at
/usr/lib/perl5/vendor_perl/5.8.8/File/Tail/Multi.pm line 259.
Use of uninitialized value in pattern match (m//) at
/usr/lib/perl5/vendor_perl/5.8.8/File/Tail/Multi.pm line 266.
ERROR: File::Tail::Multi object RemoveDuplicate must 0 or 1
and your Cpan example with my files
#-----8<-----8<-----
#!/usr/bin/perl -w
use strict;
use File::Tail::Multi;
my @_LIST_OF_FILE_PATHS = ("/var/log/ntp/stats/peerstats",
"/var/log/ntp/stats/rawstats");
my $rptTail = File::Tail::Multi->new(
Function => \&_read_line,
LastRun_File => "/tmp/app.lastrun",
Files => @_LIST_OF_FILE_PATHS
);
sub _read_line {
my $lines_ref = shift;
foreach ( @{$lines_ref} ) {
chomp;
next if $_ =~ //;
#go play, here's the line
}
}
exit(0);
#-----8<-----8<-----
gives
Odd number of elements in hash assignment at
/usr/lib/perl5/vendor_perl/5.8.8/File/Tail/Multi.pm line 81.
Unknown parameter: "/var/log/ntp/stats/rawstats"
at line 8
Can you help me? THX.
--
Regards
*WOL* fgang *S* chricker