Yes there is a better way built in.
https://github.com/kraih/mojo/blob/master/lib/Mojo/Client.pm#L1344
--
Sebastian Riedel
http://blog.kraih.com
http://mojolicious.org
http://twitter.com/kraih
For future reference, I needed also to split CouchDB output (because
it can return more than
one JSON in one chunk) and I ended up with following snippet:
https://github.com/dpavlin/angular-mojolicious/blob/master/couchdb-changes.pl
which might be useful when writing triggers based on changing CouchDB documents.
FWIW, chunked transfer is easier to use in Mojo::Client than in LWP::UserAgent
(which returns same documents over and over again when CouchDB sends
just newline).
> --
> You received this message because you are subscribed to the Google Groups "Mojolicious" group.
> To post to this group, send email to mojol...@googlegroups.com.
> To unsubscribe from this group, send email to mojolicious...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mojolicious?hl=en.
>
>
--
...2share!2flame... http://blog.rot13.org