[Catalyst] Re: question from tutorial - does creating HTML in a
controller using HTML::Widget violate MVC?
Jonathan Rockway
jon at jrock.us
Wed Dec 6 08:54:41 GMT 2006
On Wednesday 06 December 2006 02:42, A. Pagaltzis wrote:
> * John Siracusa <siracusa at mindspring.com> [2006-12-06 03:15]:
> > My stance has always been that I don't mind "code" in templates
> > so long as the sole purpose of that code is to layout and
> > format the data.
>
> ++
I prefer to make things TT plugins for maximum reusability. I don't want Perl
sitting around in my templates, because it's completely unmaintainable there.
(At least until someone writes Test::BlobOfEmbeddedPerl.) Unit testing
plugins is easy (and so is writing them). Plus, the web developers can't
mess them up (not that they want to, it's just that dreamweaver and friends
have a tendency to blow away non-HTML).
I like the coderef-in-stash approach also, but I've never actually done it.
--
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20061206/b126989c/attachment.pgp
More information about the Catalyst
mailing list