Hello,

I've been trying to write an irc bot using POE::Component::IRC. Some functions would require getting information from the web. I was able to implement a simple way to do http get requests however, they seem to be blocking. Here's the code: http://pastebin.com/E41fQDcb

A few notes on the code: It is based on https://metacpan.org/module/POE::Component::IRC::Plugin::Proxy although that shouldn't matter a lot. It waits for someone to say .test in an irc channel and when someone does, it sends a message processes an http request. The problem is that it is supposed to send the message instantly but it actually sends it after the request is completed and I can't figure out why.

I'm not very experienced with POE. Am I missing something obvious (like the request being processed in the irc session for some reason) or is it a Windows specific bug? Or perhaps is it POE::Component::IRC's fault?

I'm using ActiveState Perl 5.14.2 on Windows XP.

Thanks in advance,
Farow

Reply via email to