On Sunday December 14, 2003 13:42, A. Pagaltzis wrote:
> * 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?
Because I use them.
> 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);
or (currently) do { $data = get_data() } while $httpp->add($data);
my $req = $httpp->request();
(parse got renamed to add)
> Those interested could use an extra method to ask for a hint
> about the amount of data expected/required.
I prefer to return it, although it's fine to ignore it as you say.
--
Dave
Isa. 40:31