Jacinta Richardson <[EMAIL PROTECTED]> writes: > I've noticed that HTML::TreeBuilder is a subclass of HTML::Parser and that > HTML::Parser is required by LWP although it doesn't appear that > HTML::TreeBuilder is. > > I've recently noticed that the /usr/bin tools POST, GET, HEAD and > lwp-request provided by LWP are dependant on the deprecated HTML::Parse > module from the HTML::Tree package. I presume that at some point LWP > moved away from HTML::Parse but these tools were forgotten. These tools > fail to work in certain situations without this module being installed > (with HTML::Parse isn't in @INC errors) but do not mention in their > documentation this dependancy. > > I bring this up because I had a question today which mentioned that this > person's bash script worked perfectly up until when he tried to pass the > -o switch to lwp-request. He didn't understand Perl and didn't understand > the @INC error message. I don't think he should have had to just to use > this tool. > > I have a few questions: > > Is HTML::TreeBuilder only required for these tools or does it appear in > other parts of the distribution?
This is the only place. > Is there any specific design decision to leave HTML::TreeBuilder out of > the list of required modules? Just because we want to limit the number of dependencies. It is pretty obscure that additional modules are required if you use the -o option of lwp-request. If you know perl it should be pretty obvious what is wrong if you fail to have the module installed. Note that extra HTML::Format* modules might also be needed by -o. > Is there someone actively maintaining these tools who I should consult > before patching them to not use HTML::Parse and to test (reporting failure > reasonably) that modules exist before "require"ing them? Send suggested patches to this mailing list. > Is there a reason why all four of these files appear to be identical but > they're not installed as hard links? I have not been able to convince MakeMaker to do this. At some time we tried to install the GET, HEAD, POST aliases as symlinks, but it never worked properly. Regards, Gisle