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

Matt S Trout dbix-class at trout.me.uk
Thu May 29 11:10:14 GMT 2008


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/



More information about the Catalyst-dev mailing list