diff options
Diffstat (limited to 'lib/Net/HTTP/API/Role')
| -rw-r--r-- | lib/Net/HTTP/API/Role/Format.pm | 2 | ||||
| -rw-r--r-- | lib/Net/HTTP/API/Role/Serialization.pm | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Net/HTTP/API/Role/Format.pm b/lib/Net/HTTP/API/Role/Format.pm index 9cbd23a..6d32186 100644 --- a/lib/Net/HTTP/API/Role/Format.pm +++ b/lib/Net/HTTP/API/Role/Format.pm @@ -17,7 +17,7 @@ subtype Format => as 'Str' => where { grep {/^$format$/} keys %{content_type()}; }; -enum 'FormatMode' => qw(content-type append); +enum 'FormatMode' => [qw(content-type append)]; has api_format_options => ( is => 'rw', diff --git a/lib/Net/HTTP/API/Role/Serialization.pm b/lib/Net/HTTP/API/Role/Serialization.pm index 2c21d01..b3b7cf5 100644 --- a/lib/Net/HTTP/API/Role/Serialization.pm +++ b/lib/Net/HTTP/API/Role/Serialization.pm @@ -6,6 +6,7 @@ use 5.010; use Try::Tiny; use Moose::Role; +use Class::Load; use Net::HTTP::API::Error; has serializers => ( @@ -68,7 +69,7 @@ sub _load_serializer { my $self = shift; my $format = shift || $self->api_format; my $parser = "Net::HTTP::API::Parser::" . uc($format); - if (Class::MOP::load_class($parser)) { + if (Class::Load::load_class($parser)) { my $o = $parser->new(format_options => $self->api_format_options); $self->_add_serializer($format => $o); return $o; |
