[cgiapp] strategies for decoupling HTML::Template
Jason Purdy
jason at journalistic.com
Mon Oct 22 08:41:07 EDT 2007
Late chime-in, but my vote: -1
I'm a strong H::T proponent (despite Cees' multiple attempts to sway me
to the dark side ;)), so I enjoy the coupling of functionality.
That's subjective, of course, so let me add something objective. If it
were to become decoupled, I would have to go through all of my cgiapps
(there's gotta be >100 of 'em) and add a 'use
CGI::Application::Plugin::HTMLTemplate' line, just so my calls to
$self->load_tmpl, $self->tmpl_path, etc, work.
H::T is a simple and fast templating engine that enforces strict MVC,
too. I just wish it would support a TMPL_VIRTUAL call[1]! ;)
- Jason
[1]: http://tinyurl.com/38c5sp
Ricardo SIGNES wrote:
> I am not a big fan of HTML::Template. It just doesn't float my boat. It bugs
> me a little bit that it's a prereq of CGI::Application, especially when it
> isn't, then, really needed.
>
> Is there a plan to convert HTML::Template from a prereq into a plugin?
>
> Up-sides: no non-core prereqs as of 5.8, all "tmpl" stuff can be removed from
> core, no bias toward one template engine, clearer errors (no method) if you
> choose not to implement tmpl methods.
>
> Down-sides: things that have CGI::Application as a prereq, and use
> HTML::Template, will need to be updated to require the correct plugin in order
> to work out of the box on new installs; more steps to use CGI::App 'out of the
> box'
>
> Maybe the cons outweight the pros. I just really would like to eliminate that
> prereq. Maybe it's just like a scab I keep picking at, though, and I should
> STFU.
>
More information about the cgiapp
mailing list