X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FExtendingCatalyst.pod;h=d13c220857047bed34c6d624810fe9cd5fe52e30;hp=2e497f14390d96e51a9e67adf09ec7d0f7dcdaa8;hb=fce83e5f2a2da9f9117562d05aec1e161cc3c109;hpb=fa025310d03b9a7c3da9368c6cd7aec3ced82820 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