All pastes #387665 Raw Edit

Mine

public text v1 · immutable
·published 2007-03-09 15:04 UTC
rendered paste body
my $irc = POE::Component::IRC->spawn(
    nick => $nickname,
    server => $ircserver,
    port => $port,
    ircname => $ircname,
) or die "Unable to connect to IRC";

POE::Session->create(
    #IRC session
    package_states => [
            'main' => [ qw(_default _start irc_001 irc_public irc_join) ],
            ],
    #time
    inline_states => {
            _start => sub {
                    $_[KERNEL]->delay( tick => 10 );
                 },
            tick => sub {
                    print STDOUT "foo".time();
                    $_[KERNEL]->delay( tick => 10 );
                },
            },
            heap => { irc => $irc },
);

$poe_kernel->run();
exit 0;