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

Hi Monks,

I'm lost, I try to use HTML::Parser module,
I get a fail in the HTML::Entities module at line 145 which is:
require HTML::Parser;
It looks as if the "Parser" is calling "Entities" which calls back the "Parser"?
This is weird for me, I don't understand it.

can someone help me understand and resolve this issue?

Thanks in advance,
Moked

Replies are listed 'Best First'.
Re: HTML Parser loop
by ikegami (Patriarch) on May 31, 2009 at 07:36 UTC

    can someone help me understand and resolve this issue?

    No. "I get a fail" is diagnostically useless. Tell us what actually happens, ideally with a minimal program that reproduces the problem.

    And since you think it's a problem with the modules, let us know what version of the modules you are using.

      I use:
      HTML::Parser version 3.6
      and:
      HTML::Entities version 3.6


      This is a reduced code:
      #!/usr/bin/perl use lib '/home/my_library'; use WWW::Mechanize; use HTTP::Cookies; use Stream::Reader; exit;
      and the fail I get when I try to run it is:
      Can't locate loadable object for module HTML::Parser in @INC...
      "my_library" contains the HTML folder
      I can't tell if it's a pm problem or if I misuse the module

      Moked

        Can't locate loadable object for module HTML::Parser

        The module isn't properly installed. Like the message says, perl can't find its compiled component.

        "my_library" contains the HTML folder

        Good, although it would probably be better if /home/my_library/lib/perl5 contained it since you have nowhere logical to install the docs and so on. (You'd have to adjust the use lib line if you made this change.)