miyagawa/AnyEvent-Twitter-Stream — pull request #20 by dexterbt1 (2014-03-04 09:17:06+00:00)
Title: fixed chunked handling for long json lines

Related issue #19, which handles long lines differently by wrapping json_decode() inside an eval {}.

Our streaming app recently stopped working (as of this writing) and further checks on our logs points to an issue in handling long chunk encoded lines. Under our use case, most tweet stream are sent in very long chunk lines.

The previous implementation always assumes a single line. This patch will hopefully handle multi-line chunked content and do the necessary concatenation.