POE::Component::IRC::Test::Harness - a fully event-driven IRC server daemon module.
use POE; use POE::Component::IRC::Test::Harness; my ($pocosi) = POE::Component::IRC::Test::Harness->spawn( Alias => 'ircd' ); POE::Session->create ( inline_states => { _start => \&test_start, _stop => \&test_stop, }, heap => { Obj => $pocosi }, ); $poe_kernel->run(); exit 0; sub test_start { my ($kernel,$heap) = @_[KERNEL,HEAP]; $kernel->post ( 'ircd' => 'register' ); $kernel->post ( 'ircd' => 'add_i_line' => { IPMask => '*', Port => 6667 } ); $kernel->post ( 'ircd' => 'add_operator' => { UserName => 'Flibble', Password => 'letmein' } ); $kernel->post ( 'ircd' => 'add_listener' => { Port => 6667 } ); $kernel->post ( 'ircd' => 'set_motd' => [ 'This is an experimental server', 'Testing POE::Component::Server::IRC', 'Enjoy!' ] ); } sub test_stop { print "Server stopped\n"; }
POE::Component::IRC::Test::Harness is a POE component which implements an RFC compliant Internet Relay Chat server ( IRCd ). It will eventually end up as the foundation for the new improved[tm] POE::Component::IRC test suite.
One mandatory argument, Alias, the kernel alias you want to call the component.
See the SYNOPSIS for a flavour, consult the source code for a better idea.
Not at this point in development.
Probably a few.
Please use http://rt.cpan.org/ for reporting bugs with this component.
Chris Williams, <chris@bingosnet.co.uk>
RFC 2810 http://www.faqs.org/rfcs/rfc2810.html RFC 2811 http://www.faqs.org/rfcs/rfc2811.html RFC 2812 http://www.faqs.org/rfcs/rfc2812.html RFC 2813 http://www.faqs.org/rfcs/rfc2813.html
To install POE::Component::IRC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Component::IRC
CPAN shell
perl -MCPAN -e shell install POE::Component::IRC
For more information on module installation, please visit the detailed CPAN module installation guide.