The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XAS::Logmon::Input::Tail - A class to tail a file

SYNOPSIS

 use XAS::Logmon::Input::Tail;

 my $input = XAS::Logmon::Input::Tail->new(
    -filename => File(/home/kesteb/tukwils.lg')
 );
 
 while (my $line = $input->get()) {

 }

DESCRIPTION

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".

METHODS

get

Returns one line from the tailed file or undef if the file is moved or deleted.

init_notifier

Perform the neccessary initializtion for the notifier.

SEE ALSO

XAS::Logmon::Input::File
XAS::Logmon::Input::Tail::Default
XAS::Logmon::Input::Tail::Linux
XAS::Logmon::Input::Tail::Win32
XAS::Logmon
XAS

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

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.