This is a feature request dressed-up as an opinion request ;-)
I've found a situation where it could be desiderable to have the
possibility to load, from inside a C::A app, an HTML::Template template
from a scalar reference (while the C::A load_tmpl() method permits to
load an H::T template only from a file.)
I can post the details, should anyone be interested.
Provided that such a necessity exists, is in your opinion better to
provide C::A with the possibility to load H::T templates also from
scalar references (either by polymorphic-izing load_tmpl() or by
providing C::A with a new load_tmpl_scalar_ref() method - the latter is
really straightforward,) or in such a situation do you think is
preferable to always resort to override the present load_tmpl() or use
HTML::Template->new_scalar_ref() directly?
In effect, providing C::A with such a new feature produces just a
minimal saving, since in this case the possibility to specify a
tmpl_path is useless.
Nevertheless, minimizing the explicit invocation of external modules in
your C::A apps IMHO helps in keeping your code cleaner, more legible and
manteinable. If you also consider how easy is to provide C::A with such
a new method, it could be worthwile... (I'm willing to write the code
and provide a patch of course.)
--Emanuele Zeppieri.
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.