write_component_file(\@dir_list, $name_final, <<EOF);
package $fullname;
-use NEXT;
+use MRO::Compat;
use base '$compbase';
sub COMPONENT {
- my \$self = shift->NEXT::COMPONENT(\@_);
+ my \$self = shift->next::method(\@_);
no strict 'refs';
*{\__PACKAGE__ . "::whoami"} = sub { return \__PACKAGE__; };
\$self;
$component->{name});
}
-eval "package $appclass; use Catalyst; __PACKAGE__->setup";
+my $shut_up_deprecated_warnings = q{
+ __PACKAGE__->log(Catalyst::Log->new('fatal'));
+};
+
+eval "package $appclass; use Catalyst; $shut_up_deprecated_warnings __PACKAGE__->setup";
can_ok( $appclass, 'components');
eval qq(
package $appclass;
use Catalyst;
+$shut_up_deprecated_warnings
__PACKAGE__->config->{ setup_components } = {
search_extra => [ '::Extra' ],
except => [ "${appclass}::Controller::Foo" ]
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;
use base 'Catalyst::Model';
no warnings 'redefine';
-sub COMPONENT { return shift->NEXT::COMPONENT(\@_); }
+sub COMPONENT { return shift->next::method(\@_); }
1;
EOF