Added advanced attributes handling
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine.pm
index a7f2e7b..86eb91b 100644 (file)
@@ -2,6 +2,7 @@ package Catalyst::Engine;
 
 use strict;
 use base qw/Class::Data::Inheritable Class::Accessor::Fast/;
+use attributes ();
 use UNIVERSAL::require;
 use CGI::Cookie;
 use Data::Dumper;
@@ -624,8 +625,7 @@ sub setup_components {
 
     if ( my $error = $@ ) {
         chomp $error;
-        $self->log->error(
-            qq/Couldn't initialize "Module::Pluggable::Fast", "$error"/);
+        die qq/Couldn't load components "$error"/;
     }
 
     $self->components( {} );
@@ -669,6 +669,9 @@ sub stash {
     return $self->{stash};
 }
 
+# Takes a coderef and returns an arrayref containing attributes
+sub _get_attrs { attributes::get( $_[0] ) || [] }
+
 =back
 
 =head1 AUTHOR