From: Kennedy Clark Date: Thu, 21 May 2009 14:08:36 +0000 (+0000) Subject: Fix typos and add clarifying comments about using "sub COMPONENT" X-Git-Tag: v5.8005~147 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=commitdiff_plain;h=a70cede49db4ba051d7f0575be49b6e0f9b7a862 Fix typos and add clarifying comments about using "sub COMPONENT" --- diff --git a/lib/Catalyst/Manual/ExtendingCatalyst.pod b/lib/Catalyst/Manual/ExtendingCatalyst.pod index 2e497f1..d13c220 100644 --- a/lib/Catalyst/Manual/ExtendingCatalyst.pod +++ b/lib/Catalyst/Manual/ExtendingCatalyst.pod @@ -626,12 +626,15 @@ Here is a stub C method: sub COMPONENT { my $class = shift; - my ($app_class, $config) = @_; - - # do things here before instantiation my - $obj = $self->next::method(@_); - # do things to object after instantiation - return $object; + # 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 + $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