in reply to The fine line between control and display logic

I'd say that this is a rather bad example. And it seems it's used as an example for TT because it's just that, an example.

In this (pretty rare) case I'd suggest having a login validation action, and grant/deny access with a specified message (Too young, much too young). This message can then be displayed in the login template itself. So view logic is a clean and easy [% login_message %], and the back set's the reason into $c->stash->{ login_message }.

Ordinary morality is for ordinary people. -- Aleister Crowley