http://qs321.pair.com?node_id=782083


in reply to Problem on POE::Component::IRC::Plugin::Logger

From the documentation for the logger plugin, I gather that the IRC component must be of the POE::Component::IRC::State variety.

This plugin requires the IRC component to be POE::Component::IRC::Stat +e or a subclass thereof. It also requires a POE::Component::IRC::Plug +in::BotTraffic to be in the plugin pipeline. It will be added automat +ically if it is not present.

Change the line:

my $irc = POE::Component::IRC->spawn(

to

my $irc = POE::Component::IRC::State->spawn(

and it should work.

The Logger plugin is die'ing when it is being registered, but that is being masked by an eval wrapper in the plugin system. Setting the plugin_debug option to a true value in the spawn constructor would show this.

my $irc = POE::Component::IRC->spawn( nick => $nickname, ircname => $ircname, username => $username, server => $server, plugin_debug => 1, ) or die "Oh noooo! $!";