Adam
view release on metacpan or search on metacpan
t/02.override.t view on Meta::CPAN
use Test::More;
use Test::Deep;
POE::Kernel->run;
use POE::Component::IRC::Qnet::State;
{
package QnetBot;
use Moses;
use namespace::autoclean;
sub _build__irc {
POE::Component::IRC::Qnet::State->spawn(
Nick => $_[0]->get_nickname,
Server => $_[0]->get_server,
Port => $_[0]->get_port,
Ircname => $_[0]->get_nickname,
Options => $_[0]->get_poco_irc_options,
Flood => $_[0]->can_flood,
Username => $_[0]->get_username,
Password => $_[0]->get_password,
%{ $_[0]->get_poco_irc_args },
);
}
}
my $bot = QnetBot->new();
is(
ref $bot->irc,
'POE::Component::IRC::Qnet::State',
'override the subclass worked'
);
done_testing();
( run in 1.048 second using v1.01-cache-2.11-cpan-5a3173703d6 )