[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] load_tmpl() question.


Emanuele Zeppieri wrote

> 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.
> 


> 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 disagree. I think that by adding new methods to C::A you just clutter it up.
We could end up with hundreds of new methods that just act as interfaces to
different contructors/methods of other commonly used modules (T::T,
CGI::Session, D::FV, etc). I find that 'explicit invocation of external
modules' makes the code very easy to follow since you know exactly where to
look for documentation about what is happening. Instead, if C::A implements a
interface (which would add one more method call to your object creation
costing you .00000001 sec) to another object, then the C::A docs would try and
explain things that that particular modules documentation explains.

Instead of this, I think we should resume the discussion we had a few months
back about including some sort of plugin/registry/cleanup functionality to
C::A. Then when someone else requests this same kind of feature (just an
interface to another module) it can be implemented in it's own C::A::Plugin
style and not clutter up C::A itself.

Michael Peters
Venzia

---------------------------------------------------------------------
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.