From: Karen Etheridge Date: Sun, 10 Nov 2013 20:58:39 +0000 (-0800) Subject: Class::MOP::load_class has been deprecated in Moose 2.1200 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=16d6797e174786de65266b62d16f70e8a0bc3c27;p=gitmo%2FMooseX-Object-Pluggable.git Class::MOP::load_class has been deprecated in Moose 2.1200 --- diff --git a/Changes b/Changes index 6b893bf..832fa33 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,7 @@ Revision history for MooseX-Object-Pluggable + + - removed use of deprecated Class::MOP::load_class + 0.0011 Apr 27, 2009 Version number FAIL on last release diff --git a/lib/MooseX/Object/Pluggable.pm b/lib/MooseX/Object/Pluggable.pm index 30956e1..7734ab7 100644 --- a/lib/MooseX/Object/Pluggable.pm +++ b/lib/MooseX/Object/Pluggable.pm @@ -2,7 +2,7 @@ package MooseX::Object::Pluggable; use Carp; use Moose::Role; -use Class::MOP; +use Class::Load 'load_class'; use Scalar::Util 'blessed'; use Module::Pluggable::Object; @@ -231,7 +231,7 @@ sub _load_and_apply_role{ die("You must provide a role name") unless @roles; foreach my $role ( @roles ) { - eval { Class::MOP::load_class($role) }; + eval { load_class($role) }; confess("Failed to load role: ${role} $@") if $@; carp("Using 'override' is strongly discouraged and may not behave ".