|Perl Monk, Perl Meditation|
Can't locate auto/HTML/TreeBuilder/disembowel.alby pingo (Hermit)
|on Sep 14, 2004 at 13:31 UTC||Need Help??|
pingo has asked for the wisdom of the Perl Monks concerning the following question:
I am having trouble with the HTML::TreeBuilder module and would appreciate any help. The problem is that when I run my script as a cgi, I get the following error message:
Can't locate auto/HTML/TreeBuilder/disembowel.al in @INC (@INC contains: ...) at html_treebuilder.cgi line 12.
But when I run the same script from the prompt, it works fine, which is nice but somewhat confusing.
Here are the relevant parts of the code:
use HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new; $tree->parse_file('/www/html_treebuilder.html'); $tree = $tree->disembowel(); print "Content-type: text/html\n\n"; print $tree->as_HTML(), "\n"; $tree = $tree->delete;
If I remove the disembowel line, it works fine.
Update: Case solved (or at least identified); it was a case of different versions of the module.