[Catalyst] How to pass args/data from one controller to another?

Dustin Suchter dsuchter at ucla.edu
Sat Sep 29 03:43:27 GMT 2007


So I've thought of a few different ways to pass data between Local
methods across two different controllers, but none of them seem like
good ideas. I still don't fully get the Catalyst framework yet, so
I'm asking a very open question, "What are a few right ways to do
this?" TIMTOWTDI, of course.

i.e.

Controller "Library" has a function "list_books" that, duh, displays
a list of books in the lib. Each book is clickable creating an
action in another function in Libarary called "read_book" that's
only job in life as a function is to pass the $book_id over to the
default action in the "ReadABook" controller. How do you pass the
$book_id? Through the stash, though a path arg using 'uri_for' and a
redirect, using forward?

thanks,
-d



More information about the Catalyst mailing list