X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FAction%2FChildOf.pm;h=24fe3692edc1dbdb0f986721536ddb18c850c1e3;hp=ba6e5d2c8fe44b0cd5ec59f813b765159dd1ac3a;hb=9cc849968f79904d340abec75ebd6706746973b6;hpb=09461385e3f0f62cbf3a95a71d00f71e1a42ca75 diff --git a/t/lib/TestApp/Controller/Action/ChildOf.pm b/t/lib/TestApp/Controller/Action/ChildOf.pm index ba6e5d2..24fe369 100644 --- a/t/lib/TestApp/Controller/Action/ChildOf.pm +++ b/t/lib/TestApp/Controller/Action/ChildOf.pm @@ -8,6 +8,13 @@ use base qw/Catalyst::Controller/; sub begin :Private { } # +# TODO +# :ChildOf('') defaulting to controller namespace +# :ChildOf('..') defaulting to action in controller above +# :ChildOf == ChildOf('/') +# + +# # Simple parent/child action test # sub foo :PathPart('childof/foo') :Captures(1) :ChildOf('/') { } @@ -78,6 +85,18 @@ sub priority_b2_end :PathPart('end') :ChildOf('priority_b2') :Args(1) { } # sub opt_args :PathPart('childof/opt_args') :ChildOf('/') { } +# +# Optional PathPart test -> /childof/optpp/*/opt_pathpart/* +# +sub opt_pp_start :ChildOf('/') :PathPart('childof/optpp') :Captures(1) { } +sub opt_pathpart :ChildOf('opt_pp_start') :Args(1) { } + +# +# Optional Args *and* PathPart -> /childof/optall/*/oa/... +# +sub opt_all_start :ChildOf('/') :PathPart('childof/optall') :Captures(1) { } +sub oa :ChildOf('opt_all_start') { } + sub end :Private { my ($self, $c) = @_; my $out = join('; ', map { join(', ', @$_) }