I could swear that should work... anyone else may just up and tell me that I'm wrong though...
I guess the question to ask is really, is the perl parser complaining that 'magnet' dosen't exist or are the POE resolution macros throwing this error. In the first case the error will be something about a bareword not being allowed, but according to your code this souldn't happen. For the second case, its most obviously POE that throws the error, and it will also say something about a 'session' in the error. Now, if the second is what is happening, then you might want to turn on ASSERT_SESSIONS (I think thats the right one), which will hopefully show you when sessions are created or destroyed. Perhaps your session is being GC'd before you even get to it. Thats my answer for now, if you'd like to supply more information I can help a whole lot easier... otherwise there are smarter people than myself who can help you as well, and likely they will point out why I am wrong then too. --hachi -----Original Message----- From: Werlax [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 9:07 PM To: [EMAIL PROTECTED] Subject: PoCo::IRC subroutine? Hi all! New PoCo user here, but loving it regardless. It seems very powerful. :) (I apologize if my terminology is incorrect, but I'm still figuring this out.) I'm having a problem handling something within my function for the irc_public event. POE::Component::IRC->new( "magnet" ); POE::Session->new ( _start => \&bot_start, _stop => \&bot_stop, irc_public => \&on_public, ); Within the subroutine on_public, I make a call to another function (in a "case" statement) that tries to do a privmsg to the channel: $_[KERNEL]->post( magnet => privmsg => $nick, "$line" ); It's erroring because of the fact that "magnet" does not exist. I believe this is because only the events handled by POE::Session know about "magnet". Is this true? What can I do to work around this? Can I merely pass in magnet as a value to the subroutine? I'm assuming it's a hash. Thanks for any help!
