X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Funit_core_component_loading.t;h=6b9f8dad7f074e9f79e7637e0af3dec230cb82fd;hp=bae3c5e6d1ade154983d23d9bbf3bbeb78ed2738;hb=dbb2d5cd1b69209e53eb204e7451d688327b2e11;hpb=7fa2c9c1b85c98786655ad5169708d8dc84e8353 diff --git a/t/unit_core_component_loading.t b/t/unit_core_component_loading.t index bae3c5e..6b9f8da 100644 --- a/t/unit_core_component_loading.t +++ b/t/unit_core_component_loading.t @@ -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, <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', <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