Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

problems installing HTML::Tree

by 7stud (Deacon)
on May 08, 2010 at 13:49 UTC ( [id://839014]=perlquestion: print w/replies, xml ) Need Help??

7stud has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I want to do some html parsing, but I am having problems installing HTML::Tree on mac osx 10.4.11. Is there another module I should use instead? The output from my failed install was lengthy, so I am including just parts of it:

$ perl -v This is perl, v5.10.1 (*) built for darwin-2level-thread-multi $ sudo perl -MCPAN -e shell Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.9402) Enter 'h' for help. cpan[1]> install HTML::Tree ... .... ... Running make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" " +test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00system.t ........ 1/2 # Failed test 'use HTML::TreeBuilder;' # at t/00system.t line 7. # Tried to use 'HTML::TreeBuilder'. # Error: Can't load '/usr/local/lib/perl5/site_perl/5.10.1/darwin +-2level/auto/HTML/Parser/Parser.bundle' for module HTML::Parser: dlop +en(/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/auto/HTML/Pars +er/Parser.bundle, 2): Symbol not found: _PL_sv_undef # Referenced from: /usr/local/lib/perl5/site_perl/5.10.1/darwin-2lev +el/auto/HTML/Parser/Parser.bundle # Expected in: dynamic lookup .... # Failed test 'use HTML::TreeBuilder;' # at t/doctype.t line 7. # Failed test 'use HTML::Element;' # Failed test 'use HTML::Parse;' # at t/oldparse.t line 7. .... Test Summary Report ------------------- t/00system.t (Wstat: 512 Tests: 2 Failed: 2) Failed tests: 1-2 Non-zero exit status: 2 t/assubs.t (Wstat: 2304 Tests: 0 Failed: 0) Non-zero exit status: 9 Parse errors: No plan found in TAP output t/attributes.t (Wstat: 2304 Tests: 0 Failed: 0) Non-zero exit status: 9 Parse errors: Bad plan. You planned 1 tests but ran 0. t/body.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 11 tests but ran 1. t/building.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 39 tests but ran 1. t/children.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 4 tests but ran 1. t/clonei.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 4 tests but ran 1. t/construct_tree.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 59 tests but ran 1. t/doctype.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 5 tests but ran 1. t/escape.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 21 tests but ran 1. t/oldparse.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 17 tests but ran 1. t/parse.t (Wstat: 2304 Tests: 0 Failed: 0) Non-zero exit status: 9 Parse errors: Bad plan. You planned 40 tests but ran 0. t/parsefile.t (Wstat: 6400 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 25 Parse errors: Bad plan. You planned 5 tests but ran 1. t/split.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 445 tests but ran 1. t/tag-rendering.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 8 tests but ran 1. t/unicode.t (Wstat: 2304 Tests: 0 Failed: 0) Non-zero exit status: 9 Parse errors: Bad plan. You planned 11 tests but ran 0. Files=17, Tests=13, 2 wallclock secs ( 0.09 usr 0.09 sys + 0.62 cus +r 0.19 csys = 0.99 CPU) Result: FAIL Failed 16/17 test programs. 13/13 subtests failed. make: *** [test_dynamic] Error 9 PETEK/HTML-Tree-3.23.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports PETEK/HTML-Tree-3.23.tar.gz Running make install make test had returned bad status, won't install without force Failed during this command: PETEK/HTML-Tree-3.23.tar.gz : make_test NO

Replies are listed 'Best First'.
Re: problems installing HTML::Tree
by Corion (Patriarch) on May 08, 2010 at 14:32 UTC
    # Error: Can't load '/usr/local/lib/perl5/site_perl/5.10.1/darwin +-2level/auto/HTML/Parser/Parser.bundle' for module HTML::Parser: dlop +en(/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/auto/HTML/Pars +er/Parser.bundle, 2): Symbol not found: _PL_sv_undef # Referenced from: /usr/local/lib/perl5/site_perl/5.10.1/darwin-2lev +el/auto/HTML/Parser/Parser.bundle # Expected in: dynamic lookup

    This makes me think that the error is more with HTML::Parser. How did you install HTML::Parser? It seems as if Perl finds a version of HTML::Parser compiled for another (older?) version of Perl.

      How did you install HTML::Parser?

      I didn't. Normally, when I install a module from cpan, it installs all the prerequisites. Am I supposed to already have certain modules installed? Which ones? How would I know that?

        You see after cpan[1]> install HTML::Tree see all those ...? Thats when all that happens, when it tells you what you're missing (it doesn't actually check to see that its not broken, just present).
Re: problems installing HTML::Tree
by Jeffrey Kegler (Hermit) on May 09, 2010 at 16:17 UTC

    You might want to look at Marpa-HTML, which also does high-level HTML parsing using a new parsing algorithm. As the author of Marpa-HTML I am biased, but I use Marpa-HTML for my own work. I think you may find its interface handy and that the power of the underlying Marpa algorithm pays off in this application.

        Marpa-HTML is derived from, and replaces Marpa::UrHTML.

        For an example of how to output the HTML, look at the html_fmt utility which is part of the Marpa-HTML distribution. Warning: html_fmt is primarily intended to pretty-print HTML for reading. This keeps it pretty simple. I find most of the time the HTML output also renders the same as the input, but you can't rely on that.

        I'll look into providing an equivalent to as_HTML(). Transforming a table with zebra striping might be a good example for me to add. I'll also look into that.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://839014]
Approved by AnomalousMonk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-24 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found