[EMAIL PROTECTED] writes:

> Gisle Aas <[EMAIL PROTECTED]> wrote:
> 
> > > > You want to extend the new query_param() in some way?
> > > 
> > > I was thinking about $u->query_param(';', foo => 0..3), ie. taking the
> > > first arg as the separator.  But I'm not sure if this is actually better
> > > than the former suggestion at all.
> > 
> > This would clearly need Sean's ref trick to be unambiguous
> > 
> >      $u->query_param(\';',  foo => 0..3)
> 
> Really?

Yes, really :)

> Without the ref trick the first argument can either be 
>  - a separator char which must match m/^\W$/  or 
>  - a parameter name which should match m/^\w+$/
> 
> Or did I get something wrong?

I don't think the library should prevent you from using ";" as a
parameter name if you want.  I also want to guarantee that this code
always leave the URI in $u unchanged:

    for my $k ($u->query_param) {
        $u->query_param($k => $u->query_param($k));
    }

Regards,
Gisle

Reply via email to