Re: Please review new Perl 5 Module List
Martijn Koster (m.koster@nexor.co.uk)
Tue, 28 Feb 1995 19:03:55 +0000
> Why do we need this. Can the length be something else than what the
> perl function length($data) returns?
I don't know how expensive length is (probably not very?)... if read()
returns it, why not pass it in?
> > What about errors that may occur during the callbacks? &content
> > could return an result code of some sort, or even an error message.
> > Should WWW::Response change it's internal result code if &content
> > failed?
>
> Don't think so. Returning undef on failure and 1 otherwise (like many
> perl functions do) should be sufficient. You should be able to take a
> look at $! if you get undef.
I hope so. We simply don't know what sort of things may go wrong in
future protocols... Imagine a protocol where you can get a
notification of a cancellation half-way through retrieving a file.
The function will know what happened, and can recover gracefully. But
how does the user get to know?
> One thought that strikes me is why we don't just provide a perl
> interface to the CERN libwww code. Does anybody know the internals of
> libwww well enough to comment on how difficult this would be?
Not me :-)
-- Martijn
__________
Internet: m.koster@nexor.co.uk
X-400: C=GB; A= ; P=Nexor; O=Nexor; S=koster; I=M
X-500: c=GB@o=NEXOR Ltd@cn=Martijn Koster
WWW: http://web.nexor.co.uk/mak/mak.html