From 0d4d7d0d13bb122af3744bc5a61775c1bc8a978b Mon Sep 17 00:00:00 2001 From: franck cuny Date: Wed, 11 Aug 2010 11:12:49 +0200 Subject: use Class::MOP::load_class instead of plain eval - if the module is not found, die with message (close RT#59776) --- lib/MooseX/AbstractFactory/Role.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/MooseX/AbstractFactory') diff --git a/lib/MooseX/AbstractFactory/Role.pm b/lib/MooseX/AbstractFactory/Role.pm index d560ca9..3b27f60 100644 --- a/lib/MooseX/AbstractFactory/Role.pm +++ b/lib/MooseX/AbstractFactory/Role.pm @@ -22,7 +22,7 @@ sub create { # pull in our implementation class $factory->_validate_implementation_class($iclass); - eval "use $iclass"; + Class::MOP::load_class($iclass); my $options = $factory->_options(); -- cgit v1.2.3