X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FComponent.pm;h=ee1f99ac33451b25ea197d8c67d7f3e42c6b7e27;hb=5ec24151d10209c4bf8b4522e515dd775b51fa9c;hp=0fbca47f77be75e5ac919289b0b6efce3dd8a19a;hpb=1b79e1994c40fc525b4a84c900a5c95ffd4a2f8a;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Component.pm b/lib/Catalyst/Component.pm index 0fbca47..ee1f99a 100644 --- a/lib/Catalyst/Component.pm +++ b/lib/Catalyst/Component.pm @@ -60,7 +60,14 @@ component loader with config() support and a process() method placeholder. __PACKAGE__->mk_classdata('_plugins'); __PACKAGE__->mk_classdata('_config'); -has _component_name => ( is => 'ro' ); +has _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 +around _component_name => sub { + my ($orig, $self) = (shift, shift); + blessed($self) ? $self->$orig(@_) : $self; +}; sub BUILDARGS { my $class = shift;