What's the benefit of Jason modifying the parser to work like this?
You have two choices:
a) Write your perl code inside the template (your idea)
b) Create a global
What makes putting the code in the template better?
I'd have to say that you would end up having "code tags" scattered through your templates which makes updates difficult whereas at least globals are all in one place. There will be no speed gain or any other obvious advantage that I can think of unless you can elighten me?
Plus, Jason would have to do quite a bit of work on the parser to implement this (your suggestion of sub\s{.+} is extremely simplified and optimistic. Have you looked at the source code for GT::Template::Parser?)
You have two choices:
a) Write your perl code inside the template (your idea)
b) Create a global
What makes putting the code in the template better?
I'd have to say that you would end up having "code tags" scattered through your templates which makes updates difficult whereas at least globals are all in one place. There will be no speed gain or any other obvious advantage that I can think of unless you can elighten me?
Plus, Jason would have to do quite a bit of work on the parser to implement this (your suggestion of sub\s{.+} is extremely simplified and optimistic. Have you looked at the source code for GT::Template::Parser?)