in reply to Re: Compare URIs *params*
in thread Compare URIs

I haven't installed that module, but could you please check what your program reporst for this inpu:

my $uri1 = URI->new('/bob?joe=1&jack=2&jim=4&jim=3'); my $uri2 = URI->new('http://host/bob?jack=2&joe=1&jim=3&jim=4');

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Replies are listed 'Best First'.
Re^3: Compare URIs *params*
by jeffa (Bishop) on Oct 18, 2005 at 17:57 UTC

    Ahhhh ... throwing monkey wrenches into my code, are we? ;)

    This, of course, is not going to work, because you have a key collision with 'jim'. If you dump the hash refs out, you get something like:

    $VAR1 = { 'jack' => '2', 'joe' => '1', '3' => undef, 'jim' => '4' }; $VAR2 = { '4' => undef, 'jack' => '2', 'joe' => '1', 'jim' => '3' };
    I think there is a way to coerce URI::QueryParam into producing a data structure like so:
    $VAR1 = { 'jack' => '2', 'joe' => '1', 'jim' => ['3','4'] };
    but the point is growing moot, as halley pointed out and ikegami (and myself) how now discovered. :/

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)