On Tue, Mar 3, 2009 at 10:02 AM, Louis-David Mitterrand <vindex+lists-mason-us...@apartia.org> wrote: > On Tue, Mar 03, 2009 at 06:37:37AM -0800, Jonathan Swartz wrote: >> So, they are constants? I would just make them constants in a site- >> specific module then. > > This is a possibility, however I don't yet use modules on that site.
This would be a great time to start. This is the standard way to do deal with global constants. > To do what you suggest I should define a "PerlModule MyApp::MyConstants" > in the site virtual host? Yes. You could just use it in the components when you need it, but loading during startup makes it use less memory. > And then add constants to that module? Yes. > In the mason code these constants have to be resolved with > $MyApp::MyConstants::my_var, right? You can do that or you can import them. Check out the Exporter module in your Perl books. - Perrin ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users