* David Robins <[EMAIL PROTECTED]> [2003-12-14 19:22]:
> Yes, it is, the return values are just "hints". Of course if
> it asks for n and you give it m < n it'll return back n-m the
> next time, and if you give it less than a line and it asked for
> a line it will return the "line-hint" (-2) again.
If it is so strongly optional - it sounds like it would be used
rather seldomly, if at all - why make these hints such a central
point of the interface?
If they're not, I'd have parse() return undef until it can return
the request object. This is usable as a boolean and results in
code like this[1]:
do { $data = get_data() } until $req = $httpp->parse($data);
Those interested could use an extra method to ask for a hint
about the amount of data expected/required.
[1] Or even
1 until $req = $httpp->parse(get_data());
--
Regards,
Aristotle
"If you can't laugh at yourself, you don't take life seriously enough."