[Catalyst] TT custom virtual methods available to all pages.

Rajeev Cyrus cyrus at umn.edu
Wed Apr 23 15:45:15 BST 2008


Greetings.

One of my TT pages required some massaging of data that I decided to  
do via referencing a subroutine in a template variable, eg:
$c->stash->{mk_hash} = \&mk_hash;

I would like to use this stashed variable on all of my templates so my  
question is:
Where is the best place to initialize and set this variable? Where  
should i declare the mk_hash method? Is there some way I can configure  
catalyst to set certain template variables when the application starts?

Thanks!

-Rajeev Cyrus





More information about the Catalyst mailing list