Skip Menu |

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

Report information
The Basics
Id: 54386
Status: resolved
Worked: 4 min
Priority: 0/
Queue: File-LogReader

People
Owner: Nobody in particular
Requestors: clanherb [...] gmail.com
Cc:
AdminCc:

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



Subject: commit method does not use $self->_fh to access filehandle
If the LogReader object is created and committed immediately without any readline invocation in between, commit method will fail by reporting nothing to commit. After browsing the module code, I found *ONLY* commit method does not use $self->_fh to access filehandle. Thus, it's impossible to commit zero position when nothing is read. More important, it disallows one to open the file, seek to some position and commit. In conclusion, I think commit should use $self->_fh instead. To reproduce my problem: 1. create bug.pl with the following lines my $filename = 'test.txt'; my $lr = File::LogReader->new( filename => $filename ); $lr->commit; 2. run bug.pl Sample output: Nothing to commit! at C:/Perl/site/lib/File/LogReader.pm line 103.
Fixed this while eating breakfast and uploaded File-LogReader 0.04 to CPAN.