X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FMyApp1%2FController%2FC1.pm;h=0646229d597899a1d442a0703fc2dc7b79d04ec5;hb=77d62699ced7fd0493e9932f30c9bac5d8e913c4;hp=9aeaba73327d3bc5342092ec455f5a525cfb0202;hpb=c4057ce2f2c930b39d3eae35c1ad1bbcffb576dd;p=catagits%2FCatalystX-Routes.git diff --git a/t/lib/MyApp1/Controller/C1.pm b/t/lib/MyApp1/Controller/C1.pm index 9aeaba7..0646229 100644 --- a/t/lib/MyApp1/Controller/C1.pm +++ b/t/lib/MyApp1/Controller/C1.pm @@ -3,13 +3,15 @@ package MyApp1::Controller::C1; use Moose; use CatalystX::Routes; -extends 'Catalyst::Controller'; +BEGIN { extends 'Catalyst::Controller' } -sub _get { } -sub _get_html { } -sub _post { } -sub _put { } -sub _del { } +our %REQ; + +sub _get { $REQ{get}++ } +sub _get_html { $REQ{get_html}++ } +sub _post { $REQ{post}++ } +sub _put { $REQ{put}++ } +sub _del { $REQ{delete}++ } get '/foo' => \&_get; @@ -21,4 +23,18 @@ put '/foo' => \&_put; del '/foo' => \&_del; +get 'bar'=> \&_get; + +get_html 'bar'=> \&_get_html; + +post 'bar'=> \&_post; + +put 'bar'=> \&_put; + +del 'bar'=> \&_del; + +sub normal : Chained('/') : Args(0) { + $REQ{normal}++; +} + 1;