|
|
Choosing A Webhost: |
Re: TT's support for methods and complex structures. Why not?: msg#00031lang.perl.modules.html-template
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> |
|---|---|---|
| Previous by Date: | Re: TT's support for methods and complex structures. Why not?, Mark Stosberg |
|---|---|
| Next by Date: | Re: TT's support for methods and complex structures. Why not?, Mark Stosberg |
| Previous by Thread: | Re: TT's support for methods and complex structures. Why not?, Mark Stosberg |
| Next by Thread: | Re: TT's support for methods and complex structures. Why not?, Mark Stosberg |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |