4 package My::AttributesBaseClass;
5 use base qw( Catalyst::Controller );
7 sub fetch : Chained('/') PathPrefix CaptureArgs(0) { }
9 sub left_alone :Chained('fetch') PathPart Args(0) { }
11 sub view : PathPart Chained('fetch') Args(0) { }
13 sub foo { } # no attributes
15 package TestApp::Controller::Attributes;
16 use base qw(My::AttributesBaseClass);
18 sub _parse_MakeMeVisible_attr {
19 my ($self, $c, $name, $value) = @_;
21 return Chained => 'fetch', PathPart => 'all_attrs', Args => 0;
23 elsif ($value eq 'some'){
24 return Chained => 'fetch', Args => 0;
26 elsif ($value eq 'one'){
27 return PathPart => 'one_attr';
31 sub view { } # override attributes to "hide" url
35 sub all_attrs_action :MakeMeVisible { }
37 sub some_attrs_action :MakeMeVisible('some') PathPart('some_attrs') { }
39 sub one_attr_action :MakeMeVisible('one') Chained('fetch') Args(0) { }