X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FSerializeBase.pm;h=f99679fbb7e99a18bc4b84c8e1bc8ec47e8cf2f2;hb=29f9721bfe883351594c7d664e3778a36ceaeb27;hp=e616f8a0e8db448dc3a4a7b5f6e1a3acc3eac9be;hpb=9cd203c9c0d7099ff38fb9e1132459d76d19a360;p=catagits%2FCatalyst-Action-Serialize-Data-Serializer.git diff --git a/lib/Catalyst/Action/SerializeBase.pm b/lib/Catalyst/Action/SerializeBase.pm index e616f8a..f99679f 100644 --- a/lib/Catalyst/Action/SerializeBase.pm +++ b/lib/Catalyst/Action/SerializeBase.pm @@ -1,27 +1,23 @@ -# -# Catlyst::Action::SerializeBase.pm -# Created by: Adam Jacob, Marchex, -# -# $Id$ - package Catalyst::Action::SerializeBase; -use strict; -use warnings; +use Moose; +use namespace::autoclean; -use base 'Catalyst::Action'; +extends 'Catalyst::Action'; use Module::Pluggable::Object; use Catalyst::Request::REST; use Catalyst::Utils (); -sub new { - my $class = shift; - my $config = shift; - Catalyst::Request::REST->_insert_self_into( $config->{class} ); - return $class->SUPER::new($config, @_); -} +our $VERSION = '0.94'; +$VERSION = eval $VERSION; + +after BUILDARGS => sub { + my $class = shift; + my $config = shift; + Catalyst::Request::REST->_insert_self_into( $config->{class} ); +}; -__PACKAGE__->mk_accessors(qw(_serialize_plugins _loaded_plugins)); +has [qw(_serialize_plugins _loaded_plugins)] => ( is => 'rw' ); sub _load_content_plugins { my $self = shift; @@ -159,13 +155,13 @@ sub _serialize_bad_request { return undef; } +__PACKAGE__->meta->make_immutable; + 1; =head1 NAME -B - -Base class for Catalyst::Action::Serialize and Catlayst::Action::Deserialize. +Catalyst::Action::SerializeBase - Base class for Catalyst::Action::Serialize and Catlayst::Action::Deserialize. =head1 DESCRIPTION @@ -177,11 +173,9 @@ code for L and L. L, L, L, -=head1 AUTHOR - -Adam Jacob , with lots of help from mst and jrockway. +=head1 AUTHORS -Marchex, Inc. paid me while I developed this module. (http://www.marchex.com) +See L for authors. =head1 LICENSE