X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FAction.pm;h=e9c936303d235f5dbff4826e4c4b3ff700fdb77c;hp=8237cc0907ffd24ca252f2229dd2907e7b599971;hb=009b5b2324f83396439a494a56684efb60eb2cd8;hpb=5d4cd725c9183b1aa3634abfdaa4af7d4fdc6e93 diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index 8237cc0..e9c9363 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -8,6 +8,8 @@ Catalyst::Action - Catalyst Action
+ $c->forward( $action->private_path ); + =head1 DESCRIPTION This class represents a Catalyst Action. You can access the object for the @@ -28,6 +30,13 @@ has 'reverse' => (is => 'rw'); has attributes => (is => 'rw'); has name => (is => 'rw'); has code => (is => 'rw'); +has private_path => ( + reader => 'private_path', + isa => 'Str', + lazy => 1, + required => 1, + default => sub { '/'.shift->reverse }, +); use overload ( @@ -37,9 +46,6 @@ use overload ( # Codulate to execute to invoke the encapsulated action coderef '&{}' => sub { my $self = shift; sub { $self->execute(@_); }; }, - # Which action takes precedence - '<=>' => 'compare', - # Make general $stuff still work fallback => 1, @@ -132,6 +138,11 @@ Returns the private namespace this action lives in. Returns the private path for this action. +=head2 private_path + +Returns absolute private path for this action. Unlike C, the +C of an action is always suitable for passing to C. + =head2 name returns the sub name of this action.