[Catalyst-commits] r10220 -
Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual
hkclark at dev.catalyst.perl.org
hkclark at dev.catalyst.perl.org
Thu May 21 14:08:39 GMT 2009
Author: hkclark
Date: 2009-05-21 14:08:36 +0000 (Thu, 21 May 2009)
New Revision: 10220
Modified:
Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/ExtendingCatalyst.pod
Log:
Fix typos and add clarifying comments about using "sub COMPONENT"
Modified: Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/ExtendingCatalyst.pod
===================================================================
--- Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/ExtendingCatalyst.pod 2009-05-21 13:45:55 UTC (rev 10219)
+++ Catalyst-Manual/5.70/trunk/lib/Catalyst/Manual/ExtendingCatalyst.pod 2009-05-21 14:08:36 UTC (rev 10220)
@@ -626,12 +626,15 @@
sub COMPONENT {
my $class = shift;
- my ($app_class, $config) = @_;
+ # Note: $app is like $c, but since the application isn't fully
+ # initialized, we don't want to call it $c yet. $config
+ # is a hashref of config options possibly set on this component.
+ my ($app, $config) = @_;
- # do things here before instantiation my
- $obj = $self->next::method(@_);
- # do things to object after instantiation
- return $object;
+ # Do things here before instantiation
+ $new = $class->next::method(@_);
+ # Do things to object after instantiation
+ return $new;
}
The arguments are the class name of the component, the class name of
More information about the Catalyst-commits
mailing list