Wishlist for libwww-perl...

bcutter@pdn.paradyne.com
Tue, 12 Jul 94 16:33:40 EDT


I've recently started work on a WWW browser written in tkperl, and I
am using libwww-perl to retrieve documents, etc..  Listed below are
some enhancements that I plan to make to the library.. (not this week,
but in the next few weeks..)

just to be clear - these are things I plan to hack into the library,
and don't want or expect anyone else to be doing these - this is just
a FYI to the list as to what I plan on writing (and suggesting for
inclusion into the package) and would be interested in hearing
anyone's thoughts or if anyone else has similar needs..

- Connection and Transfer status messages

So I can make my browser like Mosaic.  I'd like to submit a
(optional) routine to the package that will be called whenver
there is anything interesting to report.  "Interesting"
would be something like:

Proxy connection established to proxy.host.com
Connection established to www.ncsa.uiuc.edu
Retrieving file /somefile.foo
123 bytes of 456 transferred...

and something similar to that.  While initially, it may return
actual strings, eventually I'd like it to report events and
the client can display it however it wants.  (For example,
in the last case it would return the filename, current byte count,
and size of file (if known))

The interface to this will probably be similar to the proposed 
way to set user_agent and from ... So you'd do something like:

&www'status_routine('print_routine');

..or something similar..

- Interruptable I/O

Like Mosaic, the ability to abort a transfer after it's been started.
I'm not sure how this is implemented in Mosaic - I figure it uses
alarm and catches SIGALRM - where it spins the icon and checks for mouse
input..

- Ability to load data to local file rather than pass back in $content

I want to limit how big (in memory) my browser will grow, and I'm worried
that someone will pull down a 20mb mpeg via HTTP and perl has to allocate
all that memory... and while it will page out memory that isn't used,
there is a problem with fragmentation of memory..

I'd like to be able to pass it a filename (like /tmp/$$) or filehandle 
and have it write the data out to it... That way, for non-text files
I can spawn a program (from .mailcap) and pass the file to that program..
For HTML/Text files, I can read/parse it a line at a time...

Just a few thoughts as to what I have in mind..

-Brooks
bcutter@paradyne.com