get ''
=> chained '_set_user'
=> args 0
- => sub { $REQ{empty} = $REQ{user} };
+ => sub { $REQ{user_end} = $REQ{user} };
+
+chain_point '_set_thing'
+ => chained '/'
+ => path_part 'thing'
+ => capture_args 1
+ => sub { $REQ{thing} = $_[2] };
+
+get ''
+ => chained '_set_thing'
+ => args 0
+ => sub { $REQ{thing_end} = $REQ{user} };
sub normal : Chained('/') : Args(0) {
$REQ{normal}++;
);
is(
- $MyApp1::Controller::C1::REQ{empty}, 99,
+ $MyApp1::Controller::C1::REQ{user_end}, 99,
'get /user/99 calls get chained from _set_user'
);
}
{
+ get('/thing/99');
+
+ is(
+ $MyApp1::Controller::C1::REQ{thing}, 99,
+ 'get /thing/99 calls _set_thing chain point'
+ );
+
+ is(
+ $MyApp1::Controller::C1::REQ{thing_end}, 99,
+ 'get /thing/99 calls get chained from _set_thing'
+ );
+}
+
+{
get('/normal');
is(