Subject: | Missing object method: content_offset in DOM.pm |
HTML-DOM-0.010
`uname -a`
Linux devlp.cinahl.com 2.6.22-14-server #1 SMP Tue Feb 12 08:27:05 UTC
2008 i686 GNU/Linux
`perl -v`
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
Parsed a saved file. The file was generated by LWP::UserAgent and
HTML::Request::Common, and cleaned using HTML::Tidy.
Upon parsing the file, this error is generated:
Can't locate object method "content_offset" via package "HTML::DOM" at
/usr/local/share/perl/5.8.8/HTML/DOM.pm line 193.
Here is the code I used to reproduce the error:
#!/usr/bin/perl
use LWP::Simple;
use HTML::DOM;
use HTML::Tidy;
my $cleaner = new HTML::Tidy ( );
my $content = get( "http://www.google.com/" );
my $cleaned = $cleaner->clean( $content );
my $parser = new HTML::DOM ( );
open( OUT, ">temp.html" ) || die ( "temp.html: $!" );
print OUT $cleaned;
close( OUT );
$parser->parse_file( "temp.html" );