Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Dev

RT #34782: [WISH] Way to remove parameter from URI

 

 

Catalyst dev RSS feed   Index | Next | Previous | View Threaded


brian.cassidy at nald

May 28, 2008, 6:42 AM

Post #1 of 5 (540 views)
Permalink
RT #34782: [WISH] Way to remove parameter from URI

On behalf of "m.e <m.e[at]acm.org>":

[WISH] Way to remove parameter from URI

$c->req->uri_for() provides a way of adding an extra parameter to a URI
or overwriting an existinf parameter, but there is no way of removing an
existing parameter. URI::QueryParam provides a query_param_delete($key)
method; something like this would be nice.

--

The original RT ticket can be found here:

http://rt.cpan.org/Ticket/Display.html?id=34782


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev[at]lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


jshirley at gmail

May 28, 2008, 9:32 AM

Post #2 of 5 (517 views)
Permalink
Re: RT #34782: [WISH] Way to remove parameter from URI [In reply to]

On Wed, May 28, 2008 at 6:42 AM, Brian Cassidy <brian.cassidy[at]nald.ca> wrote:
> On behalf of "m.e <m.e[at]acm.org>":
>
> [WISH] Way to remove parameter from URI
>
> $c->req->uri_for() provides a way of adding an extra parameter to a URI
> or overwriting an existinf parameter, but there is no way of removing an
> existing parameter. URI::QueryParam provides a query_param_delete($key)
> method; something like this would be nice.
>
> --
>
> The original RT ticket can be found here:
>
> http://rt.cpan.org/Ticket/Display.html?id=34782
>

Looks like a patch for uri_with? Maybe change the behavior for undef
values to remove (right now they are ignored). Then you can just do
$c->req->uri_with({ foo => undef });

Seems DWIW.

-J

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev[at]lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


claco at chrislaco

May 28, 2008, 9:38 AM

Post #3 of 5 (512 views)
Permalink
Re: RT #34782: [WISH] Way to remove parameter from URI [In reply to]

J. Shirley wrote:
> On Wed, May 28, 2008 at 6:42 AM, Brian Cassidy <brian.cassidy[at]nald.ca> wrote:
>> On behalf of "m.e <m.e[at]acm.org>":
>>
>> [WISH] Way to remove parameter from URI
>>
>> $c->req->uri_for() provides a way of adding an extra parameter to a URI
>> or overwriting an existinf parameter, but there is no way of removing an
>> existing parameter. URI::QueryParam provides a query_param_delete($key)
>> method; something like this would be nice.
>>
>> --
>>
>> The original RT ticket can be found here:
>>
>> http://rt.cpan.org/Ticket/Display.html?id=34782
>>
>
> Looks like a patch for uri_with? Maybe change the behavior for undef
> values to remove (right now they are ignored). Then you can just do
> $c->req->uri_with({ foo => undef });
>
> Seems DWIW.
>
> -J

jshirley++
Attachments: signature.asc (0.18 KB)


dbix-class at trout

May 29, 2008, 4:10 AM

Post #4 of 5 (500 views)
Permalink
Re: RT #34782: [WISH] Way to remove parameter from URI [In reply to]

On Wed, May 28, 2008 at 09:32:30AM -0700, J. Shirley wrote:
> On Wed, May 28, 2008 at 6:42 AM, Brian Cassidy <brian.cassidy[at]nald.ca> wrote:
> > On behalf of "m.e <m.e[at]acm.org>":
> >
> > [WISH] Way to remove parameter from URI
> >
> > $c->req->uri_for() provides a way of adding an extra parameter to a URI
> > or overwriting an existinf parameter, but there is no way of removing an
> > existing parameter. URI::QueryParam provides a query_param_delete($key)
> > method; something like this would be nice.
> >
> > --
> >
> > The original RT ticket can be found here:
> >
> > http://rt.cpan.org/Ticket/Display.html?id=34782
> >
>
> Looks like a patch for uri_with? Maybe change the behavior for undef
> values to remove (right now they are ignored). Then you can just do
> $c->req->uri_with({ foo => undef });
>
> Seems DWIW.

Sounds good. Fancy having a go at the patch?

--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev[at]lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


brian.cassidy at nald

May 29, 2008, 6:05 AM

Post #5 of 5 (502 views)
Permalink
Re: RT #34782: [WISH] Way to remove parameter from URI [In reply to]

Matt S Trout wrote:
> On Wed, May 28, 2008 at 09:32:30AM -0700, J. Shirley wrote:
>>
>> Looks like a patch for uri_with? Maybe change the behavior for undef
>> values to remove (right now they are ignored). Then you can just do
>> $c->req->uri_with({ foo => undef });
>>
>> Seems DWIW.
>
> Sounds good. Fancy having a go at the patch?

svn revision 7857: "Added the ability to remove parameters in
req->uri_with() by passing in an undef value (RT #34782)"

Ticket resolved.

-Brian

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev[at]lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

Catalyst dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.