=== lib/Catalyst/Plugin/PluginDeprecationRegistry.pm
==================================================================
--- lib/Catalyst/Plugin/PluginDeprecationRegistry.pm	(revision 6458)
+++ lib/Catalyst/Plugin/PluginDeprecationRegistry.pm	(local)
@@ -0,0 +1,128 @@
+package Catalyst::Plugin::PluginDeprecationRegistry;
+
+use strict;
+use warnings;
+
+use Text::SimpleTable;
+
+=head1 NAME
+
+Catalyst::PluginDeprecationRegistry - base list of deprecated Catalyst plugins
+
+=head1 DESCRIPTION
+
+Core list of Catalyst plugins that are marked as deprecated by the Catalyst 
+Team.
+
+=head1 METHODS
+
+=head2 deprecated_plugins
+
+Returns a list of plugin-name/true-false pairs of plugins that have been
+deprecated - the plugin names are specified in the same manner as the use 
+C<use Catalyst> statement, and any true value marks that plugin as deprecated.
+
+To add or remove plugins to the deprecated list add a C<deprecated_plugins> 
+method to C<MyApp.pm> like the following:
+
+    sub deprecated_plugins {
+        'My::Plugin' => 0, # Un-deprecate Catalyst::Plugin::My::Plugin
+        'Session::Manager' => 1 # C::P::Session::Manager is deprecated
+    }
+
+Anything from C<MyApp.pm> takes precedence over plugins specified in this
+module, so if you are still using a deprecated plugin you can remove any
+warning generated from debug output as shown above.
+
+If a plugin name ends with  a star C<*> it is treated as a wildcard, e.g 
+C<Session::Manager*> would deprecate C::P::Session::Manager, 
+C::P::Session::Manager::Client, etc. etc.
+
+If the value in the hash contains something other that just didgets it is
+treated as the modules replacement and is displayed along side the deprecated
+module.
+  
+=cut
+
+sub deprecated_plugins {
+    'Session::Manager*' => 1,
+    'Session::Manager' => 'Session',
+}
+
+=head2 check_deprecated_plugins
+
+Performs actual checking and displays list with any found.
+
+=cut
+
+sub check_deprecated_plugins {
+    $DB::single = 1;
+    my ($class) = @_;
+    
+    my $t = Text::SimpleTable->new([35,'Deprecated Plugin'],[36,'Replaced By']);
+    
+    # Get list of deprecated plugins
+    my %deprecated_plugins = 
+        map { @$_ } 
+        reverse grep { ref eq 'ARRAY' }  
+        $class->EVERY::deprecated_plugins;
+
+    # Sort out plugin names to actual class names
+    %deprecated_plugins = 
+        map { 
+            my $key = $_;
+            $key =~ s/\A\+// || $key =~ s/^/Catalyst::Plugin::/;
+            $key => $deprecated_plugins{$_}
+        } keys %deprecated_plugins;
+
+    # Build array of regexp for wildcards
+    my %wildcards = map { 
+        ((my $key) = $_) =~ s/\*$//; 
+        $_ => qr/^$key.*?$/
+    } grep { /\*$/ } keys %deprecated_plugins;
+        
+    my $any_deprecated = 0;
+    
+    foreach my $plugin ($class->registered_plugins) {
+
+        # A specific match always takes precendce
+        if (my $replaced = $deprecated_plugins{$plugin}) {
+            $any_deprecated = 1;
+            $t->row($plugin, $replaced =~ /\D/ ? $replaced : '');
+            next;
+        }
+
+        WILDCARD:
+        foreach (keys %wildcards) { 
+            if ($plugin =~ /$wildcards{$_}/) {
+                $any_deprecated = 1;
+                my $replaced = $deprecated_plugins{$_};
+                $t->row($plugin, $replaced =~ /\D/ ? $replaced : '');
+                last WILDCARD;
+            }
+        }
+
+    }
+
+    $class->log->warn("\n".'*'x78, <<"EOF" . '*'x78 . "\n" . $t->draw ) if $any_deprecated;
+*                    You are using deprecated plugins!                       *
+*                                                                            *
+*  Please upgrade your code to use new plugins, or look at                   *
+*    Catalyst::Plugin::PluginDeprecationRegistry                             *
+*  for information on how to get rid of this warning.                        *
+EOF
+
+}
+
+=head1 AUTHOR
+
+The Catalyst Core Team - see http://catalyst.perl.org/
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
