Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: TT's support for methods and complex structures. Why not?: msg#00031

lang.perl.modules.html-template

Subject: Re: TT's support for methods and complex structures. Why not?

On Mon, 18 Jul 2005, Mark Stosberg wrote:

> In the current CGI::Application scheme, we solve this with mix-ins and
> hooks for callbacks at various points. H::T seems rather mature already,
> and I'm not suggesting making these kind of extensions to it. This seems
> like a case where modifying the core strikes me as reasonable.

I think I'd take a patch to add a callback system like CGI::App has.
I doubt it would be hard at all.

> > Yes, I think that would be the easiest way. HTML::Template::Expr
> > exploits code-ref variables to offer function calls, so why not
> > methods too?
>
> Are you suggesting that the method technique may make sense to add to
> HTML::Template::Expr ?

Possibly. The bar for new features in ::Expr is pretty low. There's
already so much in there not to like that a little more can't hurt!

> The template system has to know what 'defined' means here to parse it.
> I'm suggesting:
>
> <TMPL_IF foo.is_defined>
>
> As now, we just need to check to see if we have "foo" to use, and
> quickly check to see to if it's a object or a complex data structure to
> see what to do with the bit after the dot.

I really dislike systems that try to collapse hash dereferences and
method calls into a single syntax. Petal does this and it drives me
nuts - I can never figure out what I'm looking at from the template.
And it does matter because methods may have side-effects and hash
derefs don't.

-sam


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe