require Module::Pluggable::Fast;
# Helper script generation
-our $CATALYST_SCRIPT_GEN = 10;
+our $CATALYST_SCRIPT_GEN = 11;
__PACKAGE__->mk_classdata($_)
for qw/components arguments dispatcher engine log dispatcher_class
}
}
- $class->log->warn( "You are running an old helper script! "
- . "Please update your scripts by regenerating the "
- . "application and copying over the new scripts." )
- if ( $ENV{CATALYST_SCRIPT_GEN}
- && ( $ENV{CATALYST_SCRIPT_GEN} < $Catalyst::CATALYST_SCRIPT_GEN ) );
+ $class->log->warn(
+ <<"EOF") if ( $ENV{CATALYST_SCRIPT_GEN} && ( $ENV{CATALYST_SCRIPT_GEN} < $Catalyst::CATALYST_SCRIPT_GEN ) );
+You are running an old script!
+
+ Please update by running:
+ catalyst.pl -nonew -scripts $class
+EOF
if ( $class->debug ) {
my ( $c, $class, $code ) = @_;
$class = $c->components->{$class} || $class;
$c->state(0);
- my $callsub = ( caller(1) )[3];
+
+ my $callsub =
+ ( caller(0) )[0]->isa('Catalyst::Action')
+ ? ( caller(2) )[3]
+ : ( caller(1) )[3];
my $action = '';
if ( $c->debug ) {
return $component;
}
- my $suffix = Catalyst::Utils::class2classsuffix($class);
+ my $suffix = Catalyst::Utils::class2classsuffix($component);
my $config = $class->config->{$suffix} || {};
my $instance;