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

I have inherited a script that uses libwww and its dependencies to hit some webpages and extract some info. The problem was my machine did not have any of the libwww and its dependencies. So I went and downloaded and installed each one from CPAN, here they are with their respective version numbers:

Digest-MD5-2.12
Font-AFM-1.18
HTML-Format-1.23
HTML-Parser-3.13
HTML-Tagset-3.02
HTML-Tree-3.05
MIME-Base64-2.11
URI-1.09
libnet-1.0703
libwww-perl-5.48

When I run my script, the line that uses the format method of the HTML::FormatText object I get:

"Can't locate auto/HTML/Parser/traverse.al in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at /usr/lib/perl5/site_perl/5.005/HTML/Formatter.pm line 94"

I think it has to do with HTML-Format and/or HTML-Tree, but I can not even find this traverse.al file only a traverse.pod in /usr/lib/perl5/site_perl/5.005/HTML/Element

I am running Redhat 6.2 and perl 5.005_03

Replies are listed 'Best First'.
(tye)Re: HTML-Format / HTML-Tree problem
by tye (Sage) on Oct 23, 2000 at 23:32 UTC

    I really hate the way the default for new modules is to support AutoLoader and that AutoLoader gives such a misleading error message for one of the most common problems that pops up when using modules. I've been hacking my modules to remove support for AutoLoader because of this. (Actually this problem is caused by an overuse of inheritance in the standard Perl modules, but that is a rant for another day.)

    Anyway, what that error message really means is that you tried to use the method traverse() via an object that does not support a "traverse" method.

    So don't go looking for a file called "traverse.al" as you will most likely never find one because there most likely never was one. Instead, go looking for a newer version of HTML::Parser that supports a "traverse" method. Or go looking for an older version of whatever module it was that tried to use that method to see if you can find one that works with old versions of HTML::Parser (which don't have that method).

            - tye (but my friends call me "Tye")
      Sounds good, thank you for explaining this.
      I was afraid it might be some kind of version conflict problem.
      Is there an 'easy' way to unisnstall modules? Do i just dig in the area it looked like it installed them and delete the directory for that module?
Re: HTML-Format / HTML-Tree problem
by merlyn (Sage) on Oct 23, 2000 at 23:05 UTC
      I installed them by hand, but I am now looking into this CPAN.pm for future use. I am not sure if this 'follow dependencies' option is in relation to the CPAN.pm or to perl, but if it is in relation to perl it appears that it is on 'auto' how do i change that? Yes "make test" was OK on everything.