pryrt has asked for the wisdom of the Perl Monks concerning the following question:
SUMMARY:
I had difficulty trying to install WWW::Mechanize::Chrome on Windows Strawberry Perl. In the end, running the code from the synopsis seems to work, so I think it's been sufficiently installed. However, with the difficulties I encountered, I had some questions or discussion points to bring up:
- Do others have this much difficulty installing it on Windows?
- Is there a sequence that works to reliably install it on Windows (preferrably with cpanm) without resorting to multiple attempts, and --force? Does my detailed description below provide enough to give hints, if I'm just doing something wrong
- Does corion know that the cpantesters results "lie" about a successful windows install, due to not finding chrome.exe? Is there a way to make chrome.exe a prereq, so that cpantesters reports will be more useful
- is the failure i found in t/51-mech-links.t real, or an artifact of my problematic install? If it's real, is it a bug in the test suite, or a bug in the module itself?
- If my failures end up being invalid, is there a way to delete/override the failing reports to cpantesters? (added)
TL;DR:
My first attempt to install WWW::Mechanize::Chrome (using cpanm) failed bunches of pre-reqs. Multiple attempts on the prereqs got most working. In the end, the only two pre-req failures were AnyEvent and Log::Log4perl. The latter was a known issue (https://rt.cpan.org/Public/Bug/Display.html?id=120926), so I forced that install, because it's not a module-functionality issue
AnyEvent only fails t/81_hosts.t -- it seems to not be doing what was expected with the PERL_ANYEVENT_HOSTS temporary hosts file; I verified the temp file was created correctly, and populated as t/81_hosts.t implies it should... so I'm not sure whether there's a bug there, or what. I did a --force (for now), because I wasn't sure whether WWW::Mechanize::Chrome would depend on that feature or not. My cpantesters report is at http://www.cpantesters.org/cpan/report/500da4bb-75df-1014-a202-c39384fafcb3
After that, cpanm WWW::Mechanize::Chrome still failed, and I propagated that report to cpantesters: http://www.cpantesters.org/cpan/report/72e85fc1-75e8-1014-b1ad-07b284fafcb3. As the report shows, I'm on Windows with strawberry perl 5.28.1 (x64), with chrome.exe v71.0.3578.98. It's failing t/51-mech-links.t -- finding 3 links instead of expected 2
I was surprised I had so much difficulty, because the http://fast-matrix.cpantesters.org/?dist=WWW-Mechanize-Chrome%200.27 showed all passes under Windows (until my report, which was the first 5.28.1 on windows)... but when I dug into them, it's because none of them had chrome.exe
After I did a --force install, I was able to run the synopsis:
... but I had to kill all pre-existing background chrome.exe tasks before it would respond (that may be normal, I've never used the module before).#!/usr/bin/env perl use 5.012; use warnings; use Log::Log4perl qw(:easy); use WWW::Mechanize::Chrome; Log::Log4perl->easy_init($ERROR); # Set priority of root logger t +o ERROR my $mech = WWW::Mechanize::Chrome->new(); $mech->get('https://google.com'); $mech->eval_in_page('alert("Hello Chrome")'); my $png= $mech->content_as_png();
so for the t/51-mech-links.t, I don't know whether that's a bug in the test suite, or in the actual module itself (or whether my earlier difficulties during the install process made something unstable for that test)
edit 1: fix typo in title
edit 2: add the fifth question in the SUMMARY
|
---|