Warnings about deprecated runtime plugins
Tomas Doran [Sun, 4 Jan 2009 21:59:02 +0000 (21:59 +0000)]
Makefile.PL
TODO
lib/Catalyst.pm
t/unit_core_plugin.t

index 4ea6d0d..de27fe1 100644 (file)
@@ -155,7 +155,7 @@ EOF
     return unless $found;
 
     # More or less copied from Module::Build
-    return if  $ENV{PERL_MM_USE_DEFAULT};
+    return if $ENV{PERL_MM_USE_DEFAULT};
     return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
 
     sleep 4;
diff --git a/TODO b/TODO
index 01c3873..e925394 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,6 +1,3 @@
-Pending patches:
-  - meta test for MX::Emulate::CAF needed by Catalyst::Plugin::Cache::Curried
-    
 Back-compat investigation / known issues:
 
   - Get engines tested:
@@ -39,9 +36,6 @@ Back-compat investigation / known issues:
        an exception. Needs a test case (Caelum)
      
      - Catalyst::Plugin::Authentication new release.
-     
-     - Deprecation/Upgrade notice in Catalyst Makefile.PL for known broken
-       versions of plugins.
 
   - Issues with TWMC not being loaded when it used to be in 5.70 
     (Bill Moseley)
@@ -54,7 +48,10 @@ Back-compat investigation / known issues:
      This obviously needs better tests :/
 
 Cleanups:
-    
+
+  - Allow turning deprecated warnings off with use Catalyst 
+    qw/-NoDeprecationWarnings/
+
   - Update Test suite to not assume MyApp ISA Controller
     - After that set up attr handlers that will output helpful error messages 
       when you do it as well as how to fix it.
@@ -66,8 +63,6 @@ Cleanups:
   - Find whatever in the test suite craps a file called GLOB(0xfoo) onto my 
     disk and fix it. (Believed to be in the optional TEST_HTTP tests?) (t0m)
 
-  - Deprecate runtime plugins with warning.
-
 Documentation:
 
    - extends in components with attributes must be inside a BEGIN block.
@@ -91,3 +86,6 @@ Tests:
   - Moosified test application?
 
   - Test warning from back-compat methods in Catalyst::Dispatcher
+  
+  - Test warnings from plugin method on Catalyst
+
index cef7ac7..3471a6c 100644 (file)
@@ -862,11 +862,19 @@ loads and instantiates the given class.
     MyApp->plugin( 'prototype', 'HTML::Prototype' );
 
     $c->prototype->define_javascript_functions;
+    
+B<Note:> This method of adding plugins is deprecated. The ability
+to add plugins like this B<will be removed> in a Catalyst 5.9.
+Please do not use this functionality in new code.
 
 =cut
 
 sub plugin {
     my ( $class, $name, $plugin, @args ) = @_;
+
+    # See block comment in t/unit_core_plugin.t    
+    $class->log->debug(qq/Adding plugin using the ->plugin method is deprecated, and will be removed in Catalyst 5.9/);
+    
     $class->_register_plugin( $plugin, 1 );
 
     eval { $plugin->import };
index 58ebe1e..97f8d7b 100644 (file)
@@ -19,6 +19,8 @@ use lib 't/lib';
 use Catalyst::Test qw/PluginTestApp/;
 
 ok( get("/compile_time_plugins"), "get ok" );
+# FIXME - Run time plugin support is insane, and should be removed
+#         for Catalyst 5.9
 ok( get("/run_time_plugins"),     "get ok" );
 
 use_ok 'TestApp';