On Tue, 2008-10-07 at 14:48 +0200, Paul Johnson wrote: > On Tue, Oct 07, 2008 at 01:33:02PM +0100, Raphael Mankin wrote: > > > > On Tue, 2008-10-07 at 12:50 +0100, Andy Wardley wrote: > > > > > > [% # display custom panel based on user status > > > IF user.is_admin; > > > INCLUDE admin/controls; > > > ELSIF user.is_logged_in; > > > INCLUDE user/greeting; > > > ELSE; > > > INCLUDE user/login; > > > END; > > > %] > > > If there were many such IF statements in my templates I would tend to > > use separate templates for the user states (or whatever) and let the > > controller route to the appropriate one. > > Every conditional is a missed opportunity for a derived class. > Agreed, but you still need logic somewhere to decide which derived class to use. This discussion is, partly, about where to put that logic.
- Re: DBIx::Class - Related Tables Minty
- Re: DBIx::Class - Related Tables Paul Makepeace
- Re: DBIx::Class - Related Tables Andy Wardley
- Re: DBIx::Class - Related Tables Raphael Mankin
- Re: DBIx::Class - Related Tables Chisel Wright
- Re: DBIx::Class - Related Tables Ash Berlin
- MVC (Re: DBIx::Class - Related Tables) Andy Wardley
- Re: MVC (Re: DBIx::Class - Related... Randy J. Ray
- Re: MVC (Re: DBIx::Class - Related... Raphael Mankin
- Re: MVC (Re: DBIx::Class - Related... Paul Johnson
- Re: MVC (Re: DBIx::Class - Related... Raphael Mankin
- Android musings (was Re: MVC (Re: ... IvorW
- Re: MVC (Re: DBIx::Class - Related... Andy Wardley
- Re: DBIx::Class - Related Tables Dave Hodgkinson
- Re: DBIx::Class - Related Tables Raphael Mankin
- Re: DBIx::Class - Related Tables Shevek
- Re: DBIx::Class - Related Tables Zbigniew Lukasiak
- Re: DBIx::Class - Related Tables Andy Wardley
- Re: DBIx::Class - Related Tables Matt S Trout
- Re: DBIx::Class - Related Tables Matt S Trout
- Re: DBIx::Class - Related Tables Aaron Trevena