[Catalyst] I am misunderstanding something about Private actions

Joe Landman landman at scalableinformatics.com
Sat Jan 5 23:48:56 GMT 2008


Hi folks:

   Thought I had this nailed, but it looks like I really didn't 
understand it as I should have.

   Here is the problem.  I want to forward to some private actions to 
simplify the application (and avoid repeating myself).  I want to be 
able to do this from any controller in the code.  So in reading the 
manual, I thought I was supposed to do

	$c->forward('MyApp::Root::do_something');

and not

	$c->forward('/do_something');

The latter works, the former does not.  Is this intended?  Are both 
supposed to work?

On a related note, I like naming my internal methods with an underscore 
up front.  Yeah, maybe not the best practice these days, but call it an 
old habit.  What I noticed was that private  methods named _do_something 
didn't seem to show up in the private list.  Confused me a bit.  Should 
I avoid that practice with Catalyst?  Just name them 
INTERNAL_METHOD_do_something  or something like that?  Well, you get the 
idea ...

Joe
	


-- 
Joe Landman
landman at scalableinformatics.com



More information about the Catalyst mailing list