From: Karen Etheridge Date: Thu, 5 Sep 2013 17:57:45 +0000 (-0700) Subject: Remove soon-to-be-deprecated use of Class::MOP::load_class X-Git-Tag: v1.003021~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=commitdiff_plain;h=8456006f043fdb8be0643d2978f96b987ad149ab Remove soon-to-be-deprecated use of Class::MOP::load_class --- diff --git a/Changes b/Changes index 2e90f55..14dd427 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for Devel-REPL + - removed use of deprecated functions from Class::MOP + 1.003020 2013-07-08 - shebang fixed in re.pl so it is rewritten to point to the proper perl at install time (RT#70928) diff --git a/Makefile.PL b/Makefile.PL index 05ebea3..e3f142f 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -28,6 +28,7 @@ requires 'Task::Weaken'; requires 'B::Concise'; requires 'Term::ANSIColor'; requires 'Devel::Peek'; +requires 'Module::Runtime'; recommends 'PPI::XS' => '0.902'; 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);