home *** CD-ROM | disk | FTP | other *** search
Wrap
<HTML> <HEAD> <TITLE>POE::Wheel - POE FollowTail Protocol Logic</TITLE> <LINK REL="stylesheet" HREF="../../../../Active.css" TYPE="text/css"> <LINK REV="made" HREF="mailto:"> </HEAD> <BODY> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%> <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc"> <STRONG><P CLASS=block> POE::Wheel - POE FollowTail Protocol Logic</P></STRONG> </TD></TR> </TABLE> <A NAME="__index__"></A> <!-- INDEX BEGIN --> <UL> <LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI> <LI><A HREF="#synopsis">SYNOPSIS</A></LI> <LI><A HREF="#description">DESCRIPTION</A></LI> <LI><A HREF="#public methods">PUBLIC METHODS</A></LI> <LI><A HREF="#events and parameters">EVENTS AND PARAMETERS</A></LI> <LI><A HREF="#see also">SEE ALSO</A></LI> <LI><A HREF="#bugs">BUGS</A></LI> <LI><A HREF="#authors & copyrights">AUTHORS & COPYRIGHTS</A></LI> </UL> <!-- INDEX END --> <HR> <P> <H1><A NAME="name">NAME</A></H1> <P>POE::Wheel - POE FollowTail Protocol Logic</P> <P> <HR> <H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1> <UL> <LI>Linux</LI> <LI>Solaris</LI> <LI>Windows</LI> </UL> <HR> <H1><A NAME="synopsis">SYNOPSIS</A></H1> <PRE> $wheel = new POE::Wheel::FollowTail( Handle => $file_handle, # File to tail Driver => new POE::Driver::Something(), # How to read it Filter => new POE::Filter::Something(), # How to parse it PollInterval => 1, # How often to check it InputState => $input_event_name, # State to call upon input ErrorState => $error_event_name, # State to call upon error );</PRE> <P> <HR> <H1><A NAME="description">DESCRIPTION</A></H1> <P>This wheel follows the end of an ever-growing file, perhaps a log file, and generates events whenever new data appears. It is a read-only wheel, so it does not include a <CODE>put()</CODE> method. It uses <A HREF="../../../../lib/Pod/perlfunc.html#item_tell"><CODE>tell()</CODE></A> and <A HREF="../../../../lib/Pod/perlfunc.html#item_seek"><CODE>seek()</CODE></A> functions, so it's only suitable for plain files. It won't tail pipes or consoles.</P> <P> <HR> <H1><A NAME="public methods">PUBLIC METHODS</A></H1> <UL> <LI> POE::Wheel::FollowTail::event(...) <P>Please see POE::Wheel.</P> <P></P></UL> <P> <HR> <H1><A NAME="events and parameters">EVENTS AND PARAMETERS</A></H1> <UL> <LI> PollInterval <P>PollInterval is the number of seconds to wait between file checks. Once FollowTail re-reaches the end of the file, it waits this long before checking again.</P> <P></P> <LI> InputState <P>The InputState event is identical to POE::Wheel::ReadWrite's InputState. It's the state to be called when the followed file lengthens.</P> <P>ARG0 contains a logical chunk of data, read from the end of the tailed file.</P> <P></P> <LI> ErrorState <P>The ErrorState event contains the name of the state that will be called when a file error occurs. The FollowTail wheel knows what to do with EAGAIN, so it's not considered a true error.</P> <P>The ARG0 parameter contains the name of the function that failed. ARG1 and ARG2 contain the numeric and string versions of $! at the time of the error, respectively.</P> <P>A sample ErrorState state:</P> <PRE> sub error_state { my ($operation, $errnum, $errstr) = @_[ARG0, ARG1, ARG2]; warn "$operation error $errnum: $errstr\n"; }</PRE> <P></P></UL> <P> <HR> <H1><A NAME="see also">SEE ALSO</A></H1> <P>POE::Wheel; POE::Wheel::ListenAccept; POE::Wheel::ReadWrite; POE::Wheel::SocketFactory</P> <P> <HR> <H1><A NAME="bugs">BUGS</A></H1> <P>This wheel can't tail pipes and consoles. Blargh.</P> <P> <HR> <H1><A NAME="authors & copyrights">AUTHORS & COPYRIGHTS</A></H1> <P>Please see the POE manpage.</P> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%> <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc"> <STRONG><P CLASS=block> POE::Wheel - POE FollowTail Protocol Logic</P></STRONG> </TD></TR> </TABLE> </BODY> </HTML>