Subject: | Class::MOP::load_class is deprecated |
Hi,
first, I thought the deprecation warning was fatal, than I discovered the
bug in t/marshal_http.t (see other bug report).
Anyway, here's the patch to silence the deprecation
warning (5.18.2, linux/64, MOP: 2.1204):
--- orig/Message.pm 2014-02-28 12:18:55.785941222 +0100
+++ patched/Message.pm 2014-02-28 12:31:00.661811851 +0100
@@ -9,6 +9,8 @@
use Carp qw(croak);
+use Module::Runtime qw(use_module);
+
use namespace::clean -except => [qw(meta)];
requires 'deflate';
@@ -31,7 +33,7 @@
my $subclass = $class->_version_class( $class->_get_version($data), $data );
- Class::MOP::load_class($subclass);
+ use_module($subclass);
$subclass->new_from_data(%$data);
}