X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FHTTPMethods.pm;h=e687372d8a482d930438ff9fca329fcf02f0da6a;hb=569b665ec6e28d629c114a5fe34894ad71e8e588;hp=759f9fa9a7a301e70b976d9314277dcf1d398a88;hpb=760d121ecfcc1ad7c28342a6912a472fe30e5fe0;p=catagits%2FCatalyst-Runtime.git diff --git a/t/lib/TestApp/Controller/HTTPMethods.pm b/t/lib/TestApp/Controller/HTTPMethods.pm index 759f9fa..e687372 100644 --- a/t/lib/TestApp/Controller/HTTPMethods.pm +++ b/t/lib/TestApp/Controller/HTTPMethods.pm @@ -32,57 +32,54 @@ sub any_method : Path('baz') { sub base :Chained('/') PathPrefix CaptureArgs(0) { } - sub chained_get :Chained('base') Args(0) GET { +sub chained_get :Chained('base') Args(0) GET { pop->res->body('chained_get'); - } +} - sub chained_post :Chained('base') Args(0) POST { +sub chained_post :Chained('base') Args(0) POST { pop->res->body('chained_post'); - } +} - sub chained_put :Chained('base') Args(0) PUT { +sub chained_put :Chained('base') Args(0) PUT { pop->res->body('chained_put'); - } +} - sub chained_delete :Chained('base') Args(0) DELETE { +sub chained_delete :Chained('base') Args(0) DELETE { pop->res->body('chained_delete'); - } +} - sub get_or_put :Chained('base') PathPart('get_put_post_delete') - : CaptureArgs(0) GET PUT { } +sub get_or_put :Chained('base') PathPart('get_put_post_delete') CaptureArgs(0) GET PUT { } - sub get2 :Chained('get_or_put') PathPart('') Args(0) GET { - pop->res->body('get2'); - } +sub get2 :Chained('get_or_put') PathPart('') Args(0) GET { + pop->res->body('get2'); +} - sub put2 :Chained('get_or_put') PathPart('') Args(0) PUT { - pop->res->body('put2'); - } +sub put2 :Chained('get_or_put') PathPart('') Args(0) PUT { + pop->res->body('put2'); +} - sub post_or_delete :Chained('base') PathPart('get_put_post_delete') - : CaptureArgs(0) POST DELETE { } +sub post_or_delete :Chained('base') PathPart('get_put_post_delete') CaptureArgs(0) POST DELETE { } - sub post2 :Chained('post_or_delete') PathPart('') Args(0) POST { - pop->res->body('post2'); - } +sub post2 :Chained('post_or_delete') PathPart('') Args(0) POST { + pop->res->body('post2'); +} - sub delete2 :Chained('post_or_delete') PathPart('') Args(0) DELETE { - pop->res->body('delete2'); - } - - sub check_default :Chained('base') CaptureArgs(0) { } +sub delete2 :Chained('post_or_delete') PathPart('') Args(0) DELETE { + pop->res->body('delete2'); +} - sub default_get :Chained('check_default') PathPart('') Args(0) GET { - pop->res->body('get3'); - } +sub check_default :Chained('base') CaptureArgs(0) { } - sub default_post :Chained('check_default') PathPart('') Args(0) POST { - pop->res->body('post3'); - } +sub default_get :Chained('check_default') PathPart('') Args(0) GET { + pop->res->body('get3'); +} - sub chain_default :Chained('check_default') PathPart('') Args(0) { - pop->res->body('chain_default'); - } +sub default_post :Chained('check_default') PathPart('') Args(0) POST { + pop->res->body('post3'); +} +sub chain_default :Chained('check_default') PathPart('') Args(0) { + pop->res->body('chain_default'); +} __PACKAGE__->meta->make_immutable;