[Catalyst] Global 'helper' methods
bobtfish at bobtfish.net
Tue Oct 30 22:35:20 GMT 2012
On 30 Oct 2012, at 14:39, Craig Chant wrote:
> Well I opted for putting my globals (methods and constants) in MyApp.pm
> It's working grand with $c->myMethod or $c->MY_CONSTANT
> I use to have them working as a bareword within my application , but $c->MY_CONSTANT is just as easy!
It's also several times slower :)
Unless they are methods (which use state) or constants which are really config, they're really better off in a function based style.
More information about the Catalyst