diff options
author | Julien Fiegehenn <simbabque@cpan.org> | 2023-04-30 15:30:24 +0100 |
---|---|---|
committer | Julien Fiegehenn <simbabque@cpan.org> | 2023-04-30 15:30:24 +0100 |
commit | 6afa0da847adec71f0bf8f21267396d2dbdfb34e (patch) | |
tree | 9733f05afa3d62ee670ba5df33bf372be0f289fa | |
parent | c9ceb0507f8366ec922b05c3be18317991d4a193 (diff) | |
download | uri-simbabque/pr-65.tar.gz |
disambiguate code for older Perlssimbabque/pr-65
It seems there was a bug in Perl < 5.22 that led to defined immediately
followed by a ternary '?' getting the parsing wrong. I checked this with
RJBS at the PTC and he couldn't explain why, so I just added the
brackets.
-rw-r--r-- | lib/URI/_query.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/URI/_query.pm b/lib/URI/_query.pm index 8593ab0..6bedc36 100644 --- a/lib/URI/_query.pm +++ b/lib/URI/_query.pm @@ -74,7 +74,7 @@ sub query_form { } return if !defined($old) || !length($old) || !defined(wantarray); return unless $old =~ /=/; # not a form - map { defined ? do { s/\+/ /g; uri_unescape($_) } : undef } + map { ( defined ) ? do { s/\+/ /g; uri_unescape($_) } : undef } map { /=/ ? split(/=/, $_, 2) : ($_ => undef)} split(/[&;]/, $old); } |