Log::Deep::File - Object for keeping track of info related to a log file.
This documentation refers to Log::Deep::File version 0.3.5.
use Log::Deep::File; # Create a new object my $file = Log::Deep::File->new('deep.log'); # read the log file while ( my $line = $file->line ) { # so stuff ... } # use the file name in a string print "Finished reading the file '$file'\n"; # reset the handle so that we can start again $file->reset;
new ( $name )
Param: $name - string - The log file name to be tracked
$name
Return: Log::Deep::File - A new object
Description: Creates a new object and opens the specified file.
line ( )
Return: The next line read from the log file or undef if the end of the file has been reached
Description: Reads the next line of the log file.
name ( )
Return: The name of the log file
reset ( )
Description: Resets the file handle so that it can be attempted to be read again at a later time.
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gmail.com).
Patches are welcome.
Ivan Wills - (ivan.wills@gmail.com)
Copyright (c) 2009 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install Log::Deep, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Deep
CPAN shell
perl -MCPAN -e shell install Log::Deep
For more information on module installation, please visit the detailed CPAN module installation guide.