Skip to content

Commit

Permalink
Use the mop to load plugins.
Browse files Browse the repository at this point in the history
  • Loading branch information
rafl committed Feb 18, 2009
1 parent 783214d commit 9acf59e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/Catalyst/View/Component/SubInclude.pm
@@ -1,7 +1,7 @@
package Catalyst::View::Component::SubInclude;
use Moose::Role;

use Carp qw/croak/;
use Class::MOP;
use namespace::clean;

=head1 NAME
Expand Down Expand Up @@ -155,9 +155,8 @@ sub _subinclude_plugin_class_name {
return $plugin if $plugin =~ /^$pkg/;

my $class_name = __PACKAGE__ . '::' . $plugin;

eval "require $class_name";
croak "Error requiring $class_name: $@" if $@;

Class::MOP::load_class($class_name);

$class_name;
}
Expand Down

0 comments on commit 9acf59e

Please sign in to comment.