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

Mailing List Archive: Catalyst: Dev

Tests for :Args(0) being overwritten by :Args()

 

 

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


list+catalyst-dev at davecardwell

May 22, 2007, 9:47 AM

Post #1 of 2 (957 views)
Permalink
Tests for :Args(0) being overwritten by :Args()

In the following example, I would expect args_order_0 to fire:

sub args_order_0 :Chained('/') :PathPart('chained/args_order') :Args(0) { }
sub args_order_inf :Chained('/') :PathPart('chained/args_order') :Args( ) { }

However, a call to http://localhost/chained/args_order calls
args_order_inf. After highlighting this problem to mst he asked that I
create the attached test case and send it to the list, so here you go
:)

The patches were created from
t/live_component_controller_action_chained.t and
t/lib/TestApp/Controller/Action/Chained.pm of the latest Catalyst
trunk.

--
Best wishes,
Dave Cardwell.
Attachments: Chained.pm.patch (0.25 KB)
  live_component_controller_action_chained.t.patch (0.79 KB)


list+catalyst-dev at davecardwell

May 22, 2007, 10:17 AM

Post #2 of 2 (874 views)
Permalink
Re: Tests for :Args(0) being overwritten by :Args() [In reply to]

On 22/05/07, Dave Cardwell <list+catalyst-dev [at] davecardwell> wrote:
> In the following example, I would expect args_order_0 to fire:
>
> sub args_order_0 :Chained('/') :PathPart('chained/args_order') :Args(0) { }
> sub args_order_inf :Chained('/') :PathPart('chained/args_order') :Args( ) { }
>
> However, a call to http://localhost/chained/args_order calls
> args_order_inf. After highlighting this problem to mst he asked that I
> create the attached test case and send it to the list, so here you go
> :)
>
> The patches were created from
> t/live_component_controller_action_chained.t and
> t/lib/TestApp/Controller/Action/Chained.pm of the latest Catalyst
> trunk.

mst asked that I also provided tests for cases where :CaptureArgs is
also in use. I have attached a pair of updated patches.

--
Best wishes,
Dave Cardwell.
Attachments: Chained.pm.patch (0.53 KB)
  live_component_controller_action_chained.t.patch (1.61 KB)

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


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.