man POE::Filter::IRCD () - POE::Filter::IRCD -- A POE-based parser for the IRC protocol.
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 ); 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 => '\015?\012', OutputLiteral => "\015\012" ), POE::Filter::IRCD->new(), );
DESCRIPTION
POE::Filter::IRCD provides a convenient way of parsing and creating IRC protocol lines.
METHODS
- •
- new Creates a new POE::Filter::IRCD object. The only useful argument to pass is DEBUG which will print all lines received and sent to STDERR.
- •
- get Takes an arrayref which is contains lines of IRC formatted input. Returns an arrayref of hasrefs which represents the lines. The hashref contains the following fields: prefix command params ( this is an arrayref )
- •
- put Takes an arrayref containing hashrefs of IRC data and returns an arrayref containing IRC formatted lines. eg. $hashref = { command => 'PRIVMSG', prefix => 'FooBar!foobar@foobar.com', params => [ '#foobar', 'boo!' ] }; $filter->put( [ CW$hashref ] );
- •
- debug Takes no arguments. Toggles debug output.
MAINTAINER
Chris Williams <chris@bingosnet.co.uk>
AUTHOR
Jonathan Steinert
SEE ALSO
POE POE::Filter POE::Filter::Stackable