Re: libwww-perl-5.00
Gisle Aas (aas@bergen.sn.no)
Wed, 03 Jul 1996 12:48:08 +0200
In message <v02140b07adfe2e309b50@[192.216.46.39]>, Martijn Koster writes:
> At 1:46 PM 5/26/96, Gisle Aas wrote:
>
> >Changes since 5b13 are:
> >
> > o Implemented HTML::HeadParser. This is a lightweight parser for
> > the <HEAD> section of a HTML document.
>
> Grmbl... I had one of my scripts break because of this; I did:
>
> local $SIG{__DIE__} = sub { ... }
>
> and the die got triggered by the eval { ... die $FINISHED } in the
> HeadParser. Can this be written without eval/die?
Sure, but not as elegant :-)
> Either way I'd
> like an option to turn this html-parsing behaviour off when doing a
> content().
What do you mean by "when doing a content()"?
To make this an option could easily be handeled in the same way as we
pass 'use_alarm' and 'timeout' from $ua to the $protocol module.
Perhaps we need a better way to pass this information as the number of
things to pass over grows?
> What do you think?
I think it is too bad perl does not have a "real" exception mechanism,
or perhaps that perl should not allow users to trap exceptions with
$SIG{__DIE__} when there is and eval {} waiting to catch it. I also
think that if you use $SIG{__DIE__}, then you get what you deserve :-)
We also throw exceptions (aka die) within the LWP::Socket module.
Don't you have problems with that?
Regards,
Gisle.