Woes installing HTML::Parser using -MCPAN or by hand



(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.
.



Relevant Pages

  • gtk2-2.2.1-4.i386.rpm not available
    ... I was attempting to load a few ports over the past couple of days and ... => Attempting to fetch from ... *** Error code 1 ... I tried installing flashpluinwrapper and linuxpluginwrapper (at ...
    (freebsd-questions)
  • Re: RISC OS Updater? (Was: Re: Tinct for FF beta2)
    ... The "fetch" might be ok, provided what's being fetched is small. ... download would start again) and you'd still not get anything done... ... As for installing stuff, over my dead body. ... There are several apps which I have multiple versions of installed ...
    (comp.sys.acorn.apps)
  • Re: gtk2-2.2.1-4.i386.rpm not available
    ... > installing it) would have permitted me to use my Epson C60 printer. ... > => Attempting to fetch from ... > -- paz. ... you can't download it because it is not in the ports. ...
    (freebsd-questions)
  • Installing Squirrel Mail from the Ports
    ... When I try to install Squirrelmail from /usr/ports/mail/squirrelmail I get ... WITHOUT_WWWDIR when patching or installing ...
    (freebsd-questions)