Tis file documents the revision history for Perl extension Catalyst.
+5.50
+ - Fixed relative forwarding
+ - Fixed forward arrows in debug output
+
5.49_04 2005-11-09 23:00:00
- Made context, dispatcher, engine, request and response classes
configurable.
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 ) {
my $c = shift;
my $command = shift;
+ # Get the calling class
+ my $caller = ( caller(0) )[0];
+ if ( $caller->isa('Catalyst') ) {
+ if ( ( caller(2) )[3] =~ /detach$/ ) { $caller = caller(3) }
+ elsif ( ( caller(0) )[3] =~ /forward$/ ) { $caller = caller(1) }
+ }
+
unless ($command) {
$c->log->debug('Nothing to forward to') if $c->debug;
return 0;
my $command_copy = $command;
unless ( $command_copy =~ s/^\/// ) {
- my $namespace = $c->stack->[-1]->namespace;
- $command_copy = "${namespace}/${command}";
+ my $prefix =
+ Catalyst::Utils::class2prefix( $caller,
+ $c->config->{case_sensitive} )
+ || '';
+ $command_copy = "${prefix}/${command}";
}
unless ( $command_copy =~ /\// ) {