XAS::Logmon::Input::Tail - A class to tail a file
use XAS::Logmon::Input::Tail; my $input = XAS::Logmon::Input::Tail->new( -filename => File(/home/kesteb/tukwils.lg') ); while (my $line = $input->get()) { }
This package tails a file. It will autoload mixins to handle the actual file tailing. These mixins may be specific to a particular platform. Housekeeping for file positioning is kept in "state" files. This is to allow for process restarts.
The assumption is that these are "text" files. Where a specific line terminator marks the end of the "line".
Returns one line from the tailed file or undef if the file is moved or deleted.
Perform the neccessary initializtion for the notifier.
Kevin L. Esteb, <kevin@kesteb.us>
Copyright (c) 2012-2015 Kevin L. Esteb
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.
To install XAS::Logmon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAS::Logmon
CPAN shell
perl -MCPAN -e shell install XAS::Logmon
For more information on module installation, please visit the detailed CPAN module installation guide.