[Catalyst-commits] r10925 -
Catalyst-Runtime/5.80/branches/pass_component_names/lib/Catalyst
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Sat Jul 18 09:56:17 GMT 2009
Author: t0m
Date: 2009-07-18 09:56:17 +0000 (Sat, 18 Jul 2009)
New Revision: 10925
Modified:
Catalyst-Runtime/5.80/branches/pass_component_names/lib/Catalyst/Action.pm
Catalyst-Runtime/5.80/branches/pass_component_names/lib/Catalyst/Component.pm
Log:
Add docs for changes
Modified: Catalyst-Runtime/5.80/branches/pass_component_names/lib/Catalyst/Action.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/pass_component_names/lib/Catalyst/Action.pm 2009-07-18 02:39:07 UTC (rev 10924)
+++ Catalyst-Runtime/5.80/branches/pass_component_names/lib/Catalyst/Action.pm 2009-07-18 09:56:17 UTC (rev 10925)
@@ -55,8 +55,6 @@
no warnings 'recursion';
-#__PACKAGE__->mk_accessors(qw/class namespace reverse attributes name code/);
-
sub dispatch { # Execute ourselves against a context
my ( $self, $c ) = @_;
return $c->execute( $self->class, $self );
@@ -84,7 +82,7 @@
my ($a1_args) = @{ $a1->attributes->{Args} || [] };
my ($a2_args) = @{ $a2->attributes->{Args} || [] };
- $_ = looks_like_number($_) ? $_ : ~0
+ $_ = looks_like_number($_) ? $_ : ~0
for $a1_args, $a2_args;
return $a1_args <=> $a2_args;
@@ -105,7 +103,9 @@
=head2 class
-Returns the class name where this action is defined.
+Returns the class name of the component where this action is defined.
+Derived by calling the L<Catalyst::Component/_component_class|_component_class>
+method on each component.
=head2 code
Modified: Catalyst-Runtime/5.80/branches/pass_component_names/lib/Catalyst/Component.pm
===================================================================
--- Catalyst-Runtime/5.80/branches/pass_component_names/lib/Catalyst/Component.pm 2009-07-18 02:39:07 UTC (rev 10924)
+++ Catalyst-Runtime/5.80/branches/pass_component_names/lib/Catalyst/Component.pm 2009-07-18 09:56:17 UTC (rev 10925)
@@ -172,6 +172,14 @@
return $class->new($app, $args);
}
+=head2 _component_class
+
+The class name of the component within an application. This is used to
+pass the component's class name to actions generated (becoming
+C<< $action->class >>). This is needed so that the L</COMPONENT> method can
+return an instance of a different class (e.g. a L<Class::MOP> anonymous class),
+and should be used to retrieve a component instead of C<< ref($self) >>.
+
=head2 $c->config
=head2 $c->config($hashref)
More information about the Catalyst-commits
mailing list