Subject: | POE::Wheel::FollowTail Mishandles Input |
Date: | Mon, 22 Nov 2010 14:55:18 -0600 |
To: | <bug-POE [...] rt.cpan.org> |
From: | "David Webb" <david.webb [...] blishmize.com> |
When POE::Wheel::FollowTail is waiting for changes to a file while using
POE::Filter::Line, it mishandles cases where multiple lines are written in
one operation. For example:
echo foo > myfile
echo bar > myfile
raises events for "foo" and "bar" as expected while:
echo "foo\nbar" > myfile
raises an event for "foo" but leaves "bar" in the buffer.
This appears to be caused by line 355 in FollowTail.pm. It looks like it was
changed from get() to get_one() in version 1.281 but the foreach loop was
not changed to a while loop. As a result, it only gets the first line after
a multi-line write.