summary refs log tree commit diff
diff options
context:
space:
mode:
authorChisel <chisel@chizography.net>2014-01-08 15:58:51 +0000
committerChisel <chisel@chizography.net>2014-01-08 15:59:21 +0000
commit7253523a6fb3c4a7123397948e774ab02198b5c3 (patch)
tree53ef36765597160c2729778fa7d602e820545343
parentWrap enum values in arrayref (franckcuny/net-http-spore#30) (diff)
downloadnet-http-spore-7253523a6fb3c4a7123397948e774ab02198b5c3.tar.gz
Use Class::Load::load_class instead of Class::MOP::load_class
This should resolve franckcuny/net-http-spore/#32

No new deps need to be specified as the dist uses [AutoPrereqs]
-rw-r--r--lib/Net/HTTP/Spore/Role/Middleware.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Net/HTTP/Spore/Role/Middleware.pm b/lib/Net/HTTP/Spore/Role/Middleware.pm
index 88d64d4..7fe7310 100644
--- a/lib/Net/HTTP/Spore/Role/Middleware.pm
+++ b/lib/Net/HTTP/Spore/Role/Middleware.pm
@@ -1,6 +1,7 @@
 package Net::HTTP::Spore::Role::Middleware;
 
 use Moose::Role;
+use Class::Load;
 use Scalar::Util qw/blessed/;
 
 has middlewares => (
@@ -16,7 +17,7 @@ has middlewares => (
 sub _load_middleware {
     my ( $self, $mw, $cond, @args ) = @_;
 
-    Class::MOP::load_class($mw) unless blessed($mw);
+    Class::Load::load_class($mw) unless blessed($mw);
 
     my $code = $mw->wrap( $cond, @args );
     $self->_trace_msg('== enabling middleware %s', $mw);
@@ -51,7 +52,7 @@ sub enable_if {
     confess "condition must be a code ref" if (!$cond || ref $cond ne 'CODE');
 
     if(ref($mw) eq 'CODE'){ # anonymous middleware
-        Class::MOP::load_class('Net::HTTP::Spore::Middleware');
+        Class::Load::load_class('Net::HTTP::Spore::Middleware');
         my $anon = Class::MOP::Class->create_anon_class(
             superclasses => ['Net::HTTP::Spore::Middleware'],
             methods => {