[jifty-devel] Re: [Jifty-commit] r2305 - Template-Declare/lib/Template/Declare

Jesse Vincent jesse at bestpractical.com
Wed Dec 6 11:02:49 EST 2006




On Wed, Dec 06, 2006 at 06:55:24PM +0800, Audrey Tang wrote:
> 
> 在 Dec 4, 2006 3:11 AM 時,Jesse Vincent 寫到:
> 
> >This starts to feel like too much magic. I'd love a way to quote the
> >thing to the left of 'is'. (And worst case, this information needs  
> >to be
> >in the perldoc, not just a commit message ;)
> 
> Does this work for you, with attrs(&;@) prototype?

Yes, that works for me :)

> 
>     div { attrs { id => 'foo', class => 'bar' }
>         outs(...);
>     }
> 
> The key here is that we can allow the syntax above, as well as:
> 
>     div { attrs { id is 'foo', class is 'bar' }
>         outs(...);
>     }
> 
> and:
> 
>     div {{ id is 'foo', class is 'bar' }
>         outs(...);
>     }
> 
> depending on how much verbosity one wants, but the use of curly braces
> and the lack of semicolons is consistent.  Will that make you happy? :-)
> 
> Thanks,
> Audrey

-- 


More information about the jifty-devel mailing list