Merge branch 'master' into gsoc_breadboard
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Component.pm
index 1b494a2..1ea719f 100644 (file)
@@ -61,7 +61,7 @@ It provides you with a generic new() for component construction through Catalyst
 component loader with config() support and a process() method placeholder.
 
 B<Note> that calling C<< $self->config >> inside a component is strongly
-disrecommended - the correctly merged config should have already been
+not recommended - the correctly merged config should have already been
 passed to the constructor and stored in attributes - accessing
 the config accessor directly from an instance is likely to get the
 wrong values (as it only holds the class wide config, not things loaded
@@ -74,14 +74,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 {