On 7/4/07, Jonathan Rockway <[EMAIL PROTECTED]> wrote:
I agree that this is a terrible way to do things. Perl has the right idea with $sigils, so at least &functions look different from other @things. Oh, and you know... a lexical scope.
If you feel the need for complicated scoping rules in your templates, you probably should be using in-line perl in them rather than a mini-language. There are plenty of options for that, including TT2. For those out there who like TT2's mini-language, I've been using it for many years without ever encountering any of the problems described in this thread. I never add any variables to the stash from inside my templates (temporary loop variables excluded), avoid MACRO (I only use PROCESS), and generally keep the templates very, very simple. And I have documentation that describes the data structure that will be in the stash for each page. Templates aren't normal code (even with in-line perl) and they don't handle complexity like real code does, so you have to control your impulse to turn them into thousands of little components. It just gets too confusing. - Perrin _______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/