POE::Component::IRC::Test::Harness3pm
A fully event-driven irc server daemon module.
Usage
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();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";}
Overview
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.
Methods
- "spawn"
-
One mandatory argument, Alias, the kernel alias you want to call the component.
Input
See the SYNOPSIS for a flavour, consult the source code for a better idea.
Output
Not at this point in development.
Releases
2 releases since Debian 4.0 (Etch); the text changed 1 time.