Subject: | t/query test 18 breaks with Perl 5.6.0 |
Under perl v5.6.0 built for i386-freebsd, URI 1.31 fails test 18 of t/query, preventing installation without force.
The test in question says
$u->query_form(a => { foo => 1 });
print "not " unless $u =~ /^\?a=HASH\(/;
print "ok 18\n";
If you add the debug print line
print STDERR "\$u='$u'\n";
you see that $u actually does stringize correctly, e.g.
$u='?a=HASH(0x80fd854)'
However, the naked application of the =~ match operator to the hash pointer $u appears to fail under 5.6.0.
My workaround was to change the test to say
$u->query_form(a => { foo => 1 });
my $v = ""."$u";
print "not " unless $v =~ /^\?a=HASH\(/;
print "ok 18\n";
The forcible conversion to a string expression satisfies the test.
-- Tom Neff