[EMAIL PROTECTED] (Randal L. Schwartz) writes:
> >>>>> "Robert" == Robert Urban <[EMAIL PROTECTED]> writes:
>
> Robert> For example, it's not clear whether a local filename can be
> Robert> given as '$html_document'. Examples can reduce 1/2 hour of
> Robert> trial and error and swearing to 15 seconds of simple
> Robert> comprehension.
>
> Hmm. Whenever the docs don't do it for me, I simply type
>
> perldoc -m HTML::Form
>
> to look at the source, and I can probably still have the answer closer
> to 15 seconds, not a 1/2 hour.
>
> I've also never seen a Perl function accept either a filename or
> a string in the same parameter... since that would be ambiguous, since
> any filename could be a string, and any string could be a filename.
> So I would have looked for a different function already.
>
> This is not to say that more examples wouldn't be nice, but I don't
> think they're necessary, at least for the question you cited above.
Examples are also more likely to be added if a patch is provided :-)
Regarding HTML::Form->parse: It was as mistake to not just pass on the
$html_document parameter directly to HTML::TokeParser so that parsing
both from files and literal documents could be automatically
supported. I guess there is no way to fix this other than using new
names:
HTML::Form->parse_string($str, $base);
HTML::Form->parse_file($file, $base);
Regards,
Gisle