Subject: | WWW::Mechanize::new() changed the default for autocheck |
See "autocheck" in
http://search.cpan.org/~petdance/WWW-Mechanize-1.60/lib/WWW/Mechanize.pm#new%28%29
The old default failed silently. The new default (autocheck => 1)
throws an exception when a page cannot be found, leading to messages like
Error GETing %s: %s at blib/lib/WWW/CheckSite/Spider.pm line 220
from t/02spider.t after 8 ok tests.
This made the tests fail.
I made them pass by changing one 154 in lib/WWW/CheckSite/Spider.pm as
follows (or see attached patch file):
$opts{ua_args} ||= { autocheck => 0 };
Subject: | fix_mech_autocheck.patch |
diff -rupN WWW-CheckSite-0.018/lib/WWW/CheckSite/Spider.pm WWW-CheckSite-new/lib/WWW/CheckSite/Spider.pm
--- WWW-CheckSite-0.018/lib/WWW/CheckSite/Spider.pm 2007-05-13 05:36:39.000000000 -0700
+++ WWW-CheckSite-new/lib/WWW/CheckSite/Spider.pm 2009-12-08 20:00:17.000000000 -0800
@@ -151,7 +151,7 @@ sub new {
$opts{_stack} = new_stack();
$opts{_cache} = new_cache();
- $opts{ua_args} ||= { };
+ $opts{ua_args} ||= { autocheck => 0 };
my $self = bless \%opts, $class;
$self->init_agent;