in reply to Re^2: Clean way to build URI's?
in thread Clean way to build URI's?

I was asking why the OP thought so. Now we'll never know for sure.

BTW:URL encoding is easily applied after the interpolation.

Replies are listed 'Best First'.
Re^4: Clean way to build URI's?
by moritz (Cardinal) on Feb 02, 2010 at 13:19 UTC
    BTW:URL encoding is easily applied after the interpolation.

    Not without possible data loss.

    my $value = 'foo&bar=baz'; my $key = 'something' my $url1 = encode_url("http://example.com/script?$value=$key"); my $url2 = 'http://example.com/script?%s=%s', map encode_url_chunk($_) +, $key, $value;

    For proper working functions encode_url and encode_url_chunk (which have to encode different things, of course) the outcome will be different.

    Perl 6 - links to (nearly) everything that is Perl 6.
Re^4: Clean way to build URI's?
by ikegami (Patriarch) on Feb 02, 2010 at 16:15 UTC
    No it's not. The encoder would have no way to know which "?" (for example) are separators (can't be encoded) and which "?" are data (must be encoded).