Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

poe::filter::ircd(3pm) [debian man page]

POE::Filter::IRCD(3pm)					User Contributed Perl Documentation				    POE::Filter::IRCD(3pm)

NAME
POE::Filter::IRCD - A POE-based parser for the IRC protocol. SYNOPSIS
use POE::Filter::IRCD; my $filter = POE::Filter::IRCD->new( debug => 1, colonify => 0 ); my $arrayref = $filter->get( [ $hashref ] ); my $arrayref2 = $filter->put( $arrayref ); use POE qw(Filter::Stackable Filter::Line Filter::IRCD); my ($filter) = POE::Filter::Stackable->new(); $filter->push( POE::Filter::Line->new( InputRegexp => '15?12', OutputLiteral => "1512" ), POE::Filter::IRCD->new(), ); DESCRIPTION
POE::Filter::IRCD provides a convenient way of parsing and creating IRC protocol lines. It provides the parsing engine for POE::Component::Server::IRC and POE::Component::IRC. A standalone version exists as Parse::IRC. CONSTRUCTOR
"new" Creates a new POE::Filter::IRCD object. Takes two optional arguments: 'debug', which will print all lines received to STDERR; 'colonify', set to 1 to force the filter to always colonify the last param passed in a put(), default is 0. See below for more detail. METHODS
"get_one_start" "get_one" "get_pending" "get" Takes an arrayref which is contains lines of IRC formatted input. Returns an arrayref of hashrefs which represents the lines. The hashref contains the following fields: prefix command params ( this is an arrayref ) raw_line For example, if the filter receives the following line, the following hashref is produced: LINE: ':moo.server.net 001 lamebot :Welcome to the IRC network lamebot' HASHREF: { prefix => ':moo.server.net', command => '001', params => [ 'lamebot', 'Welcome to the IRC network lamebot' ], raw_line => ':moo.server.net 001 lamebot :Welcome to the IRC network lamebot', } "put" Takes an arrayref containing hashrefs of IRC data and returns an arrayref containing IRC formatted lines. Optionally, one can specify 'colonify' to override the global colonification option. eg. $hashref = { command => 'PRIVMSG', prefix => 'FooBar!foobar@foobar.com', params => [ '#foobar', 'boo!' ], colonify => 1, # Override the global colonify option for this record only. }; $filter->put( [ $hashref ] ); "clone" Makes a copy of the filter, and clears the copy's buffer. "debug" With a true or false argument, enables or disables debug output respectively. Without an argument the behaviour is to toggle the debug status. MAINTAINER
Chris Williams <chris@bingosnet.co.uk> AUTHOR
Jonathan Steinert LICENSE
Copyright X Chris Williams and Jonathan Steinert This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details. SEE ALSO
POE POE::Filter POE::Filter::Stackable POE::Component::Server::IRC POE::Component::IRC Parse::IRC perl v5.10.1 2009-12-11 POE::Filter::IRCD(3pm)

Check Out this Related Man Page

POE::Filter::HTTPChunk(3pm)				User Contributed Perl Documentation			       POE::Filter::HTTPChunk(3pm)

my $TEXT = qr/[^[:cntrl:]]/o; my $qdtext = qr/[^[:cntrl:]"]/o; #<any TEXT except <">> my $quoted_pair = qr/\[[:ascii:]]/o; my $quoted_string =
qr/"(?:$qdtext|$quoted_pair)"/o; my $separators = "[^()<>@,;:\"/[]?={} 	"; my $notoken = qr/(?:[[:cntrl:]$separators]/o;

       my $chunk_ext_name = $token; my $chunk_ext_val = qr/(?:$token|$quoted_string)/o;

       my $chunk_extension = qr/(?:;$chunk_ext_name(?:$chunk_ext_val)?)/o;

       sub put {
	 die "not implemented yet"; }

NAME
POE::Filter::HTTPChunk - Non-blocking incremental HTTP chunk parser. VERSION
version 0.947 SYNOPSIS
# Not a complete program. use POE::Filter::HTTPChunk; use POE::Wheel::ReadWrite; sub setup_io { $_[HEAP]->{io_wheel} = POE::Wheel::ReadWrite->new( Filter => POE::Filter::HTTPChunk->new(), # See POE::Wheel::ReadWrite for other required parameters. ); } DESCRIPTION
This filter parses HTTP chunks from a data stream. It's used by POE::Component::Client::HTTP to do the bulk of the low-level HTTP parsing. CONSTRUCTOR
new "new" takes no parameters and returns a shiny new POE::Filter::HTTPChunk object ready to use. METHODS
POE::Filter::HTTPChunk supports the following methods. Most of them adhere to the standard POE::Filter API. The documentation for POE::Filter explains the API in more detail. get_one_start ARRAYREF Accept an arrayref containing zero or more raw data chunks. They are added to the filter's input buffer. The filter will attempt to parse that data when get_one() is called. $filter_httpchunk->get_one_start(@stream_data); get_one Parse a single HTTP chunk from the filter's input buffer. Data is entered into the buffer by the get_one_start() method. Returns an arrayref containing zero or one parsed HTTP chunk. $ret_arrayref = $filter_httpchunk->get_one(); get_pending Returns an arrayref of stream data currently pending parsing. It's used to seamlessly transfer unparsed data between an old and a new filter when a wheel's filter is changed. $pending_arrayref = $filter_httpchunk->get_pending(); SEE ALSO
POE::Filter, POE. BUGS
None are known at this time. AUTHOR &; COPYRIGHTS POE::Filter::HTTPChunk is... o Copyright 2005-2006 Martijn van Beers o Copyright 2006 Rocco Caputo All rights are reserved. POE::Filter::HTTPChunk is free software; you may redistribute it and/or modify it under the same terms as Perl itself. CONTACT
Rocco may be contacted by e-mail via <mailto:rcaputo@cpan.org>, and Martijn may be contacted by email via <mailto:martijn@cpan.org>. The preferred way to report bugs or requests is through RT though. See http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-Client-HTTP <http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-Client-HTTP> or mail mailto:bug-POE-Component-Client-HTTP@rt.cpan.org <mailto:bug- POE-Component-Client-HTTP@rt.cpan.org> For questions, try the POE mailing list (poe@perl.org) perl v5.14.2 2012-06-03 POE::Filter::HTTPChunk(3pm)
Man Page