Well, I disagree.  The point of MVC in this case is to separate your
display code from your request processing code.  The display code
doesn't need to be in the template.  I think this has been pretty well
covered on the list before, so I won't go into more than that.

If restructuring your code to allow some perl to run before handing
off the data is too difficult, then use perl from the template.  You
can do in-line perl, or just load a module and call it from within a
template.  Or you could pass objects to the template instead of raw
data, and give the objects methods that calculate the display data you
want.

There are lots of ways to do it.

- Perrin

On Wed, Jun 10, 2009 at 10:51 AM, Tosh Cooey<[email protected]> wrote:
> Hi Perrin, for sure I will have to keep that in consideration if all
> else fails, but doing so breaks the MVCness I like to think I know
> something about!
>
> Thanks!
>
> Tosh
>
>
> Perrin Harkins wrote:
>> On Wed, Jun 10, 2009 at 9:23 AM, Tosh Cooey<[email protected]> wrote:
>>> My first instinct is to check date.now versus the second representation
>>> of the timestamp but I can't see how to make that conversion that using
>>> the Date plugin, nor does there seem to be a trivial way to accomplish this.
>>
>> It's simple in perl.  Just check it before you pass the data to the
>> template and adjust your data.
>>
>> - Perrin
>>
>
> --
> McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/
>
> _______________________________________________
> templates mailing list
> [email protected]
> http://mail.template-toolkit.org/mailman/listinfo/templates
>

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to