Hi all!!
I'm making a bot using perl with POE::Component::IRC , and for now all is well. But I have a problem with the logger pluggin of POE I've been documenting for pluggins, and I have no problem with others, but this fails.And apparently not output any error.
Only i have problem when i dont use 'Path'.
I publish my code, maybe someone has a solution or tell me how to find the solution.
Data:
Perl Version: 5.10.0-19
POE Version: 6.09
#!/usr/bin/perl use strict; use warnings; use POE qw(Component::IRC); use POE::Component::IRC::Plugin::BotTraffic; use POE::Component::IRC::Plugin::Logger; my $nickname = 'Fulgor101'; my $ircname = 'Observando'; my $server = 'dune.irc-hispano.org'; my $username = 'Fulgor'; my @channels = ('#pruebas'); # We create a new PoCo-IRC object my $irc = POE::Component::IRC->spawn( nick => $nickname, ircname => $ircname, username => $username, server => $server, ) or die "Oh noooo! $!"; POE::Session->create( package_states => [ main => [ qw(_default _start irc_001 irc_public irc_bot_publi +c) ], ], heap => { irc => $irc }, ); sub _start { my $heap = $_[HEAP]; # retrieve our component's object from the heap where we stashed +it my $irc = $heap->{irc}; $irc->yield( register => 'all' ); $irc->yield( connect => { } ); $irc->plugin_add( 'BotTraffic', POE::Component::IRC::Plugin::BotT +raffic->new() ); $irc->plugin_add('Logger', POE::Component::IRC::Plugin::Logger->n +ew(Path =>'home/user',Private => 1,Public => 1,DCC => 1, )); return; } . . . sub irc_bot_public { my ($kernel, $heap) = @_[KERNEL, HEAP]; my $channel = $_[ARG0]->[0]; my $what = $_[ARG1]; print "I said '$what' on channel $channel\n"; return; }
After launching it, everything it's ok, the BotTraffic run perfectly. And 'Logger' pluggin, gives no error when loading. Lines that appear when launching the script.
user@Box:~$ perl 3cosa.pl irc_registered: 'POE::Component::IRC=HASH(0x86873c0)' irc_plugin_add: 'BotTraffic' 'POE::Component::IRC::Plugin::BotTraffic +=HASH(0x86982d8)' irc_plugin_add: 'Logger' 'POE::Component::IRC::Plugin::Logger=HASH(0x +86522b8)' irc_connected: 'dune.irc-hispano.org' irc_notice: 'dune.irc-hispano.org' [IP_LOOKUP] '*** Found your hostna +me (CACHED!).' irc_ping: 'eMa8oAUCf6UWWOKo' Connected to dune.irc-hispano.org irc_002: 'dune.irc-hispano.org' 'Your host is dune.irc-hispano.org, r +unning version u2.10.H.10.110' [Your host is dune.irc-hispano.org, ru +nning version u2.10.H.10.110] irc_003: 'dune.irc-hispano.org' 'This server was created lun mar 2 20 +09 at 13:47:21 CET' [This server was created lun mar 2 2009 at 13:47: +21 CET] . . .
And I have tried different routes in the variable 'Path', and i revised the permits ... and nothing, they was ok. But nothing, the log not create.
I can not think of anything ... something is beyond me and not that, maybe someone see something more ...
A greeting and thanks
PD<> Sorry for my poor english

In reply to Problem on POE::Component::IRC::Plugin::Logger by Kamikaze

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.