Merge master into gsoc_breadboard
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Component.pm
index 1c61eb2..c450624 100644 (file)
@@ -53,7 +53,7 @@ Catalyst::Component - Catalyst Component Base Class
 This is the universal base class for Catalyst components
 (Model/View/Controller).
 
-It provides you with a generic new() for instantiation through Catalyst's
+It provides you with a generic new() for component construction through Catalyst's
 component loader with config() support and a process() method placeholder.
 
 =cut
@@ -63,14 +63,12 @@ __PACKAGE__->mk_classdata('_config');
 
 has catalyst_component_name => ( is => 'ro' ); # Cannot be required => 1 as context
                                        # class @ISA component - HATE
-# Make accessor callable as a class method, as we need to call setup_actions
-# on the application class, which we don't have an instance of, ewwwww
-# Also, naughty modules like Catalyst::View::JSON try to write to _everything_,
+# Naughty modules like Catalyst::View::JSON try to write to _everything_,
 # so spit a warning, ignore that (and try to do the right thing anyway) here..
 around catalyst_component_name => sub {
     my ($orig, $self) = (shift, shift);
     Carp::cluck("Tried to write to the catalyst_component_name accessor - is your component broken or just mad? (Write ignored - using default value.)") if scalar @_;
-    blessed($self) ? $self->$orig() || blessed($self) : $self;
+    return $self->$orig() || blessed($self);
 };
 
 sub BUILDARGS {
@@ -180,7 +178,7 @@ The arguments are expected to be a hashref and are merged with the
 C<< __PACKAGE__->config >> hashref before calling C<< ->new >>
 to instantiate the component.
 
-You can override it in your components to do custom instantiation, using
+You can override it in your components to do custom construction, using
 something like this:
 
   sub COMPONENT {