[Catalyst] auto() confusion [in 5.33]
    Chisel Wright 
    chisel at herlpacker.co.uk
       
    Fri Nov 11 16:31:18 CET 2005
    
    
  
I'm a tad confused with the arguments that get passed to auto().
I have a class ::C::Report with two sub routines in it:
sub auto : Private {
    my ($self, $c, $controller, $action, $client_id) = @_;
	$c->log->debug("CONTROLLER: $controller");
	$c->log->debug("ACTION    : $action");
	$c->log->debug("CLIENT ID : $client_id");
	return 1;
}
sub list : Local {
    my ($self, $c, $controller, $action, $client_id) = @_;
	$c->stash->{template} = 'report/list.tt';
}
If I hit my application with something like /report/fish/15 I see:
 CONTROLLER: report
 ACTION    : fish
 CLIENT ID : 15
However if I hit it with the defined action /report/list/15 I see:
 CONTROLLER: 15
 ACTION    :
 CLIENT ID :
I'm a tad confused, and I guess I'm wondering the correct way to get the
'15' from the processed url.
I don't quite understand why pieces are being removed from the info
passed to auto().
Is this a conceptual brain fart on my part, or is the answer "upgrade to
5,5"?
Chisel
-- 
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/
    
    
More information about the Catalyst
mailing list