From: Wallace Reis Date: Sat, 4 May 2013 17:32:49 +0000 (+0200) Subject: Unicode plugin: have it automatically applied X-Git-Tag: 5.90040~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=ed471321ac484f49682c6f4975e8396bcbce9dd6 Unicode plugin: have it automatically applied --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 068c102..844f036 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -2974,10 +2974,22 @@ the plugin name does not begin with C. return $class; } + sub _default_plugins { return qw(Unicode::Encoding) } + sub setup_plugins { my ( $class, $plugins ) = @_; $class->_plugins( {} ) unless $class->_plugins; + $plugins = [ grep { + m/Unicode::Encoding/ ? do { + $class->log->warn( + 'Unicode::Encoding plugin is now part of core,' + . ' please remove this from your appclass' + ); + () } + : $_ + } @$plugins ]; + unshift @$plugins, $class->_default_plugins; $plugins = Data::OptList::mkopt($plugins || []); my @plugins = map {