Bug 235785 - www/p5-WWW-Mechanize: add dependency HTML::TokeParser
Summary: www/p5-WWW-Mechanize: add dependency HTML::TokeParser
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Sunpoet Po-Chuan Hsieh
Depends on:
Reported: 2019-02-16 19:26 UTC by perlhack
Modified: 2019-08-24 17:49 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (perl)


Note You need to log in before you can comment on or make changes to this bug.
Description perlhack 2019-02-16 19:26:32 UTC
I recently installed 'www/p5-WWW-Mechanize' and wrote a short script.


use strict;
use warnings;

use WWW::Mechanize;

my $mech = WWW::Mechanize->new();

Executing that, I get the following error:

Can't locate HTML/TokeParser.pm in @INC (you may need to install the HTML::TokeParser module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.28 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.28/mach /usr/local/lib/perl5/5.28) at /usr/local/lib/perl5/site_perl/WWW/Mechanize.pm line 15.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/WWW/Mechanize.pm line 15.
Compilation failed in require at ./test.pl line 6.
BEGIN failed--compilation aborted at ./test.pl line 6.

According to the METACPAN info for WWW:Mechanize, the package HTML::TokeParser is a dependency.

There is currently no p5-HTML-TokeParser port, so it will need to be created. (Note that there is a p5-HTML-TokeParser-Simple port, though.)
Comment 1 Walter Schwarzenfeld freebsd_triage 2019-08-08 02:09:25 UTC
Comment 2 Sunpoet Po-Chuan Hsieh freebsd_committer 2019-08-10 21:12:37 UTC
I cannot reproduce the failure.

HTML::TokeParser is part of www/p5-HTML-Parser which is already a build/runtime dependency of www/p5-WWW-Mechanize. Please confirm that p5-HTML-Parser is installed which should be done automatically. For Perl 5.28, HTML::TokeParser should be installed at /usr/local/lib/perl5/site_perl/mach/5.28/HTML/TokeParser.pm. If you cannot find it, rebuild/reinstall both ports and try again.
Comment 3 perlhack 2019-08-24 16:45:55 UTC
The system on which I had this issue had perl5.28 with p5-HTML-Parser-3.72 installed (HTML::TokeParser was at version 3.69). I'm not sure why HTML::TokeParser wasn't found in my path, as it existed at /usr/local/lib/perl5/site_perl/mach/5.28/HTML/TokeParser.pm and had the correct permissions.

I recently reinstalled perl (pkg install -f perl5, which upgraded to perl 5.30), and I also reinstalled p5-HTML-Parser, and the problem is now resolved.