1 package Catalyst::ControllerRole::SerializeConfig;
3 use namespace::clean -except => 'meta';
5 my @KEYS = qw(map content_type_stash_key default);
7 has serialize_config => (
14 sub _build_serialize_config {
16 my $c = $self->_application;
18 if ( exists $self->{serialize} ) {
19 $c->log->info("Using deprecated configuration for Catalyst::Action::REST!");
20 $c->log->info("Please see perldoc Catalyst::Action::REST for the update guide");
21 $config = $self->{serialize};
22 # if they're using the deprecated config, they may be expecting a
23 # default mapping too.
24 $config->{map} ||= $self->{map};
26 # do not store a reference to itself in the controller
28 map {; $_ => $self->{$_} } @KEYS