Fix my retardedness with ::MVC:: warning having no conditional. Pull all the stuff...
[catagits/Catalyst-Runtime.git] / t / lib / Catalyst / Plugin / Test / Deprecated.pm
diff --git a/t/lib/Catalyst/Plugin/Test/Deprecated.pm b/t/lib/Catalyst/Plugin/Test/Deprecated.pm
new file mode 100644 (file)
index 0000000..a9552da
--- /dev/null
@@ -0,0 +1,20 @@
+package Catalyst::Plugin::Test::Deprecated;
+
+use strict;
+use warnings;
+use NEXT;
+
+use base qw/Catalyst::Base/;
+
+sub prepare {
+    my $class = shift;
+    # Note: This use of NEXT is deliberately left here (without a use NEXT)
+    #       to ensure back compat, as NEXT always used to be loaded, but
+    #       is now replaced by Class::C3::Adopt::NEXT.
+    my $c = $class->NEXT::prepare(@_);
+    $c->response->header( 'X-Catalyst-Plugin-Deprecated' => 1 );
+
+    return $c;
+}
+
+1;