}
}
}
- else {
- $result = $command;
- }
unless ($result) {
- my $comp;
+ my $class = ref($command) || ref($c->component($command));
+ my $method = shift || 'process';
- unless ( $comp = $c->component($command) ) {
+ unless ( $class ) {
my $error =
qq/Couldn't forward to command "$command". Invalid action or component./;
$c->error($error);
return 0;
}
- my $class = ref $comp;
- my $method = shift || 'process';
-
if ( my $code = $class->can($method) ) {
my $action = $self->method_action_class->new(
{