X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Funit_core_component_loading.t;fp=t%2Funit_core_component_loading.t;h=5b6a4a7873b47297650ecd0c173505c73261a3a9;hb=30fe793be0d7595dcd1b888ef281c03864f6cd1d;hp=c8098c6f9cb2c86fa655bbe17e3d6761ef1564e0;hpb=a13118d38dfb62e5110605e4d4f6885dd3fc959b;p=catagits%2FCatalyst-Runtime.git diff --git a/t/unit_core_component_loading.t b/t/unit_core_component_loading.t index c8098c6..5b6a4a7 100644 --- a/t/unit_core_component_loading.t +++ b/t/unit_core_component_loading.t @@ -63,10 +63,9 @@ sub make_component_file { write_component_file(\@dir_list, $name_final, <next::method(\@_); + my \$self = shift->NEXT::COMPONENT(\@_); no strict 'refs'; *{\__PACKAGE__ . "::whoami"} = sub { return \__PACKAGE__; }; \$self; @@ -82,11 +81,7 @@ foreach my $component (@components) { $component->{name}); } -my $shut_up_deprecated_warnings = q{ - __PACKAGE__->log(Catalyst::Log->new('fatal')); -}; - -eval "package $appclass; use Catalyst; $shut_up_deprecated_warnings __PACKAGE__->setup"; +eval "package $appclass; use Catalyst; __PACKAGE__->setup"; can_ok( $appclass, 'components'); @@ -145,7 +140,6 @@ foreach my $component (@components) { eval qq( package $appclass; use Catalyst; -$shut_up_deprecated_warnings __PACKAGE__->config->{ setup_components } = { search_extra => [ '::Extra' ], except => [ "${appclass}::Controller::Foo" ] @@ -171,7 +165,7 @@ package ${appclass}::Model::TopLevel; use base 'Catalyst::Model'; sub COMPONENT { - my \$self = shift->next::method(\@_); + my \$self = shift->NEXT::COMPONENT(\@_); no strict 'refs'; *{\__PACKAGE__ . "::whoami"} = sub { return \__PACKAGE__; }; \$self; @@ -190,7 +184,7 @@ package ${appclass}::Model::TopLevel::Nested; use base 'Catalyst::Model'; no warnings 'redefine'; -sub COMPONENT { return shift->next::method(\@_); } +sub COMPONENT { return shift->NEXT::COMPONENT(\@_); } 1; EOF