Remove use of NEXT from the test suite, except for one (commented) case to test back...
[catagits/Catalyst-Runtime.git] / t / unit_core_component_loading.t
index bae3c5e..6b9f8da 100644 (file)
@@ -40,7 +40,7 @@ my @components = (
     { type => 'View', prefix => 'View', name => 'Foo' },
 );
 
-sub write_component_file {
+sub write_component_file { 
   my ($dir_list, $module_name, $content) = @_;
 
   my $dir  = File::Spec->catdir(@$dir_list);
@@ -63,10 +63,10 @@ sub make_component_file {
 
     write_component_file(\@dir_list, $name_final, <<EOF);
 package $fullname;
-use NEXT;
+use Class::C3;
 use base '$compbase';
 sub COMPONENT {
-    my \$self = shift->NEXT::COMPONENT(\@_);
+    my \$self = shift->next::method(\@_);
     no strict 'refs';
     *{\__PACKAGE__ . "::whoami"} = sub { return \__PACKAGE__; };
     \$self;
@@ -165,8 +165,8 @@ write_component_file([$libdir, $appclass, 'Model'], 'TopLevel', <<EOF);
 package ${appclass}::Model::TopLevel;
 use base 'Catalyst::Model';
 sub COMPONENT {
-
-    my \$self = shift->NEXT::COMPONENT(\@_);
+    my \$self = shift->next::method(\@_);
     no strict 'refs';
     *{\__PACKAGE__ . "::whoami"} = sub { return \__PACKAGE__; };
     \$self;
@@ -185,7 +185,7 @@ package ${appclass}::Model::TopLevel::Nested;
 use base 'Catalyst::Model';
 
 no warnings 'redefine';
-sub COMPONENT { return shift->NEXT::COMPONENT(\@_); }
+sub COMPONENT { return shift->next::method(\@_); }
 1;
 
 EOF