Skip Menu |

This queue is for tickets about the File-Tail CPAN distribution.

Report information
The Basics
Id: 93224
Status: new
Priority: 0/
Queue: File-Tail

People
Owner: Nobody in particular
Requestors: POULHS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: File::Tail does not respect $INPUT_RECORD_SEPARATOR when using using tail
The "tail => N" attribute does not respect the $/ - $INPUT_RECORD_SEPARATOR for reading records. That would be a very nice feature. Here is the output from the attached script: ./File-Tail.pl more ____ ____ block #9 ____ multilined ____ more ____ ____ block #10 ____ multilined ____ more ____ ____ ^C
Subject: File-Tail.pl
#!/usr/bin/perl use strict; use warnings; use English qw( -no_match_vars ); use File::Tail; $INPUT_RECORD_SEPARATOR = "\n\n"; open( LOG, ">/tmp/fail.tail.bug" ); foreach my $i ( 0..10 ) { print LOG "block #$i\nmultilined\nmore\n\n"; } close( LOG ); my $file = File::Tail->new( name => "/tmp/fail.tail.bug", tail => 10 ); while ( defined( my $line=$file->read ) ) { print $line; } continue { print "____\n"; }
As can be seen from the example output, this goes for "read" as well, which may be even more important.