Skip Menu |
 

This queue is for tickets about the Jifty CPAN distribution.

Report information
The Basics
Id: 70489
Status: resolved
Priority: 0/
Queue: Jifty

People
Owner: Nobody in particular
Requestors: fschlich [...] cis.fu-berlin.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.10518
Fixed in: (no value)

Attachments


Subject: t/Mapper/t/01-raw-api.t fails with latest Test::WWW:Mechanize
Download (untitled) / with headers
text/plain 254b
Hi, recent (>= 1.34) Test::WWW:Mechanize->content_lacks() will throw a fatal error when passed a (regex-)reference instead of a scalar. As the value passed doesn't need regular expression powers, just change it into a scalar. Patch attached. Florian
Subject: content_lacks-wants-scalar-not-regex.patch
--- a/t/Mapper/t/01-raw-api.t +++ b/t/Mapper/t/01-raw-api.t @@ -29,62 +29,62 @@ #### Degenerate cases $mech->get("$URL/index.html?J:M-foo="); $mech->content_like(qr/foo: ''/, "Nothing shows up as the empty string"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); $mech->get("$URL/index.html?J:M-foo=bar"); $mech->content_like(qr/foo: bar/, "String sets to value"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); #### Flat arguments $mech->get("$URL/index.html?J:M-foo=A`bar"); $mech->content_like(qr/foo: ~/, "Passing no parameter sets to undef"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); $mech->get("$URL/index.html?J:M-foo=A`bar;bar=baz"); $mech->content_like(qr/foo: baz/, "Passing parameter sets to value"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); $mech->get("$URL/index.html?J:M-foo=A`bar;bar=baz;bar=troz"); $mech->content_like(qr/bar: &1\s*\n\s+- baz\n\s+- troz/, "Multiple parameters are list"); $mech->content_like(qr/foo: \*1/, "Multiple parameters are to same reference"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); #### Action results $mech->get("$URL/index.html?J:M-foo=R`grail`bar"); $mech->content_like(qr/foo: ~/, "Action doesn't exist, sets to undef"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); $mech->get("$URL/index.html?J:M-foo=R`grail`bar;J:A-grail=GetGrail"); $mech->content_like(qr/foo: ~/, "Content name doesn't exist, sets to undef"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); $mech->get("$URL/index.html?J:M-foo=R`grail`castle;J:A-grail=GetGrail"); $mech->content_like(qr/foo: Aaaaaargh/, "Content name exists, sets to value"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); #### Action arguments $mech->get("$URL/index.html?J:M-foo=A`bridge`bar"); $mech->content_like(qr/foo: ~/, "Action doesn't exist, sets to undef"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); $mech->get("$URL/index.html?J:M-foo=A`bridge`bar;J:A-bridge=CrossBridge"); $mech->content_like(qr/foo: ~/, "Argument name doesn't exist, sets to undef"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); $mech->get("$URL/index.html?J:M-foo=A`bridge`quest;J:A-bridge=CrossBridge"); $mech->content_like(qr/foo: ~/, "Argument is valid but missing, sets to undef"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); $mech->get("$URL/index.html?J:M-foo=A`bridge`name;J:A-bridge=CrossBridge"); $mech->content_like(qr/foo: ~/, "Argument is valid with default_value but missing, sets to undef"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); $mech->get("$URL/index.html?J:M-foo=A`bridge`quest;J:A-bridge=CrossBridge;J:A:F-quest-bridge=grail"); $mech->content_like(qr/foo: grail/, "Argument is valid, sets to submitted value"); -$mech->content_lacks(qr/J:M-foo/, "Doesn't have mapping parameter"); +$mech->content_lacks('J:M-foo', "Doesn't have mapping parameter"); 1;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.