Remove use of NEXT from the test suite, except for one (commented) case to test back...
[catagits/Catalyst-Runtime.git] / t / lib / Catalyst / Plugin / Test / Headers.pm
index 0cb4794..3d01b55 100644 (file)
@@ -1,24 +1,25 @@
 package Catalyst::Plugin::Test::Headers;
 
 use strict;
+use Class::C3;
 
 sub prepare {
     my $class = shift;
 
-    my $c = $class->NEXT::prepare(@_);
+    my $c = $class->next::method(@_);
 
     $c->response->header( 'X-Catalyst-Engine' => $c->engine );
     $c->response->header( 'X-Catalyst-Debug' => $c->debug ? 1 : 0 );
     
     {
-        my @components = sort keys %{ $c->components };
-        $c->response->headers->push_header( 'X-Catalyst-Components' => [ @components ] );
+        my $components = join( ', ', sort keys %{ $c->components } );
+        $c->response->header( 'X-Catalyst-Components' => $components );
     }
 
     {
         no strict 'refs';
-        my @plugins = sort grep { m/^Catalyst::Plugin/ } @{ $class . '::ISA' };
-        $c->response->headers->push_header( 'X-Catalyst-Plugins' => [ @plugins ] );
+        my $plugins = join ', ', $class->registered_plugins;
+        $c->response->header( 'X-Catalyst-Plugins' => $plugins );
     }
 
     return $c;
@@ -26,7 +27,7 @@ sub prepare {
 
 sub prepare_action {
     my $c = shift;
-    $c->NEXT::prepare_action(@_);
+    $c->next::method(@_);
     $c->res->header( 'X-Catalyst-Action' => $c->req->action );
 }