Hello,
this is very weird, because I cannot replicate what you find:
Show quoted text> However, I've noticed a strange pattern.
> Whatever I give as a value to bufsize, it _always_ dies with the same
> message (with different bytes):
This sounds to me as if your Perl is picking up a different module
version (which had this bug). If I use the below script, I get the error
that the buffer size of 1025 is too small, which is OK, as I pass that
too small buffer size in.
Really do check that the correct module versions get loaded. Are you
sure that you are running the version of Perl that you think you are
running?
I've added the below code as another test file, just to make sure that
the buffer size always gets picked up.
-max
#!perl -w
use strict;
use Test::More;
use WWW::Mechanize::Firefox;
my $mech = eval { WWW::Mechanize::Firefox->new(
autodie => 0,
bufsize => 1025, # a too small size, but still larger than the
Net::Telnet default
#log => ['debug'],
)};
if (! $mech) {
my $err = $@;
plan skip_all => "Couldn't connect to MozRepl: $@";
exit
} else {
plan tests => 3;
};
isa_ok $mech, 'WWW::Mechanize::Firefox';
my $response;
my $result = eval {
$response = $mech->get('
http://perl.org/', no_cache => 1); # a
large website
1
};
ok !$result, "We died on the call";
like $@, qr/1025/, "... and we got the correct bufsize error";