The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

POE::Component::IRC::Test::Harness - a fully event-driven IRC server daemon module.

SYNOPSIS

  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";
  }

DESCRIPTION

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.

BUGS

Probably a few.

Please use http://rt.cpan.org/ for reporting bugs with this component.

AUTHOR

Chris Williams, <chris@bingosnet.co.uk>

SEE ALSO

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