Woes installing HTML::Parser using -MCPAN or by hand
am 03.09.2005 04:11:18 von amperry(Posted on perl.beginners as well)
Hi folks,
I tried installing WWW::Mechanize using the commands "perl -MCPAN -e shell"
and "install WWW::Mechanize." To make a long story short, I had
prerequisites, which the CPAN module was only to happy to fetch for me, but
installing (at least one of) them failed.
I narrowed it down tentatively to the HTML::Parser module, downloaded the
tar.gz file, unpacked, make'd (made?) make tested, and got more errors. The
summary line looks like there must be useful information in it, if only I
could figure it out:
Failed Test Stat Wstat Total Fail Failed List of Failed
------------------------------------------------------------ -------------------
t/entities.t 11 6 54.55% 1-3 7-9
t/headparser.t 6 1 16.67% 3
t/uentities.t 14 2 14.29% 2 8
2 subtests skipped.
Failed 3/45 test scripts, 93.33% okay. 9/356 subtests$$ref =~ s/([^\n\r\t
!\#\$%\'-;=?-~])/$char2entity{$1} || num_entity($1)/ge;
failed, 97.47% okay.
make: *** [test_dynamic] Error 29
--now, I found out an error that says "t/entities...........Malformed UTF-8
character (unexpected non-continuation byte 0x72, immediately after start
byte 0xe5) in substitution iterator at
/home/amperry/HTML-Parser-3.45/blib/lib/HTML/Entities.pm line 458.", where
line 458 reads:
$$ref =~ s/([^\n\r\t !\#\$%\'-;=?-~])/$char2entity{$1} || num_entity($1)/ge;
--but I have no idea what's wrong with it, whether the regex is bad or some
value in %char2entity is wrong.
This seems to be the basis for other tests going wrong, as I also get the
errors:
t/headparser.........ok 2/6Parsing of undecoded UTF-8 will give garbage when
decoding entities at /home/amperry/HTML-Parser-3.45/blib/lib/HTML/Parser.pm
line 104.
t/headparser.........NOK 3# Test 3 got: 'Ã
være eller å ikke være'
(t/headparser.t at line 137)
# Expected: 'Ã
være eller å ikke være'
# t/headparser.t line 137 is: ok($p->header("Title"), "Ã
være eller å ikke
være");
--and:
t/entities...........NOK 4Confused test output: test 4 answered after test 6
t/entities...........NOK 5Confused test output: test 5 answered after test 7
t/entities...........NOK 6Confused test output: test 6 answered after test 8
--so I'm completely flummoxed. Is is something wrong in my system? I seem to
be able to use other utf-8 encoded applications. If something's wrong with
the module, I surely can't be the first person to have run into the
problem.
Anyone up for helping me on this? It would be much appreciated.
Thanks,
--AMP
--
to reply by email, eliminate redundancy in address
"Hardly used" will not fetch a better price for your brain.