Subject: | nonsensical credentials test |
Date: | Tue, 24 Mar 2015 17:37:09 +0000 |
To: | bug-WWW-Mechanize [...] rt.cpan.org |
From: | Zefram <zefram [...] fysh.org> |
In WWW-Mechanize's t/credentials-api.t there's this test:
my @ua = $ua->credentials;
isnt( "@ua", "mech2 mech2", 'LWP::UserAgent instance retains its old credentials' );
This looks nonsensical. The ->credentials method on LWP::UserAgent
isn't documented as being callable with no arguments, and indeed the
lack of arguments is causing a runtime warning:
t/credentials-api.t ...... Use of uninitialized value in lc at /opt/perl-5.20.2/lib/site_perl/5.20.2/LWP/UserAgent.pm line 606.
t/credentials-api.t ...... ok
Presumably the call ought to include $netloc and $realm parameters
matching whatever the WWW::Mechanize objects are doing.
-zefram