Mik0r has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I am using POE::Component::IRC for my IRC bot. I have written a script using File::Tail to print a log file in real-time. The script works fine as a separate script but when I add this script into my IRC bot it causes it to lock up and ping out. I'm assuming It's a buffer issue. I've tried setting $| = 1; and I tried changing the while loop to an if loop like in the POE cookbook so it looked like this:
sub outputlog { if ($switch == 1) { sleep 3; print "test"; outputlog->(); } }
But no matter what I try even to do a basic loop like above it causes the bot to freeze and ping out. Anyone have any insight on how to make an infinite loop unbuffered in POE?
Back to
Seekers of Perl Wisdom