[Catalyst] Making subrequests in views

Andrew Rodland arodland at comcast.net
Sun Nov 23 11:58:59 GMT 2008

On Sunday 23 November 2008 03:29:11 am Alexander Tamm wrote:
> Hi,
> I'm pretty new to Catalyst and new to this mailing list. In other words,
> my apologies if this question has been frequently answered or if I've
> missed the relevant documentation.
> My basic setup is a Catalyst application running under FastCGI, using
> View::Mason for my views. I need to include a navigation component in
> most - not all - views, so I'm thinking about what strategy I should use
> to populate the stash with the correct data. As I see it, I have at
> least three options, but I'm not sure how smart they are.
> 1) I could always populate the stash in auto() and call the
> corresponding Mason component when needed. This means fetching some data
> even if it isn't needed.

This version, except that instead of doing it in auto, you do it in end or in 
an ActionClass, only when you know you're going to need it (that is, you're 
actually sending back a page that includes the menu, and not a redirect or a 
downloadable file or whatever else).


More information about the Catalyst mailing list