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

I want to drop dead.

When I include the line: use HTML::TokeParser; The PC shows me "perl interpreter encountered error" window, then end of the code of perl.

I then tried use ppm install the html::tokeparser. There is no such module in the ppm list.

I looked in to perl/lib/html directory. Tokerparser was there with some other modules. Then I tried to include the Html::Element into code only, same error. I also can't see the html::element module in ppm list

The problem is if there is no such html::tokeparser in my perl, I should get the "can't locate ...@INC" error. Not the perl interpreter error. And If there is a such Html::tokeparser module, I should be able to see it on my ppm list and install or update of it.

I use ActivePerl 5.88. I also tried reinstall perl, didn't work.

Please help me

Replies are listed 'Best First'.
Re: Cannot use HTML::TokeParser
by bart (Canon) on Sep 01, 2007 at 10:54 UTC
    HTML::TokeParser comes with HTML::Parser, HTML::Element with HTML::Tree.
    The problem is if there is no such html::tokeparser in my perl, I should get the "can't locate ...@INC" error. Not the perl interpreter error.
    You're right. That does indeed imply there's a lot more wrong than just a missing module. Do you have, by any chance, more than one perl installed? An older version, 5.6.x or earlier?
    I looked in to perl/lib/html directory. Tokerparser was there with some other modules.

    Try

    perl -le "print for @INC"
    and see if the modules you can find are under one of the directories listed there, or if it's using modules of another version of Perl.
Re: Cannot use HTML::TokeParser
by initself (Monk) on Sep 01, 2007 at 10:15 UTC

    When you use PPM, you need to be aware of two things:

    1. The PPM module names most always have a '-' where you might expect a '::'. For instance, HTML::TokeParser becomes HTML-TokeParser.
    2. You might need to include an additional repository in addition to the default ActiveState repository:

      ppm rep add trouchelle.com http://trouchelle.com/ppm/

After running that command, you should see HTML-TokeParser available in your PPM.

      bart is right. I deleted all perl related files, then reinstalled. Now it's working. But the trouchelle.com repository again not working for me. My ppm can't unpack the modules from the repository. Again why?
        ppm can't unpack the modules from the repository

        The trouchelle repository bundles the modules into zip archives (instead of the more usual tar.gz format), and older versions of ppm can handle only the tar.gz format.

        However, since you're using perl 5.8.8, I would expect that you have a version of ppm that does handle the zip format. What do you get when you run ppm version ?

        Also, which build of ActivePerl are you running ? I get:
        C:\>perl -e "print $ActivePerl::VERSION" 822 C:\>
        Cheers, Rob
Re: Cannot use HTML::TokeParser
by andreas1234567 (Vicar) on Sep 01, 2007 at 10:47 UTC
    What does ppm repo list say:
    C:\>ppm repo list +----+------+--------------------------------+ + id + pkgs + name + +----+------+--------------------------------+ + 1 + 6843 + ActiveState Package Repository + + 2 + 648 + theoryx + +----+------+--------------------------------+ (2 enabled repositories) C:\>
    Read perldoc ppm and experiment with the repo commands.
    --
    Andreas
Re: Cannot use HTML::TokeParser
by f00li5h (Chaplain) on Sep 01, 2007 at 13:17 UTC

    in Cannot use HTML::TokeParser zli034 said q{ I then tried use ppm install the html::tokeparser. There is no such module in the ppm list. }

    I'm not sure if it's a too-lazy-to-careism or if it's exactly as you asked PPM to install but Perl's module names are case sensitive and that could be what's causing the module to be absent (although I'm not sure how nicely that plays with windows' case-insensitive filesystem)

    @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;