X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FScript.pm;h=3e4dd4bb7261907ffc36b1c34d8067f07c871656;hp=c748b95332ea90c02dac8ffacdcbd5b9789172b3;hb=8456006f043fdb8be0643d2978f96b987ad149ab;hpb=a3772582813b370b2ec327270db2c66d62edbb00 diff --git a/lib/Devel/REPL/Script.pm b/lib/Devel/REPL/Script.pm index c748b95..3e4dd4b 100644 --- a/lib/Devel/REPL/Script.pm +++ b/lib/Devel/REPL/Script.pm @@ -4,6 +4,7 @@ use Moose; use Devel::REPL; use File::HomeDir; use File::Spec; +use Module::Runtime 'use_module'; use vars qw($CURRENT_SCRIPT); use namespace::autoclean; @@ -34,7 +35,7 @@ sub BUILD { sub load_profile { my ($self, $profile) = @_; $profile = "Devel::REPL::Profile::${profile}" unless $profile =~ /::/; - Class::MOP::load_class($profile); + use_module $profile; confess "Profile class ${profile} doesn't do 'Devel::REPL::Profile'" unless $profile->does('Devel::REPL::Profile'); $profile->new->apply_profile($self->_repl);