[jifty-devel] Re: [Jifty-commit] r2305 -
Template-Declare/lib/Template/Declare
Jesse Vincent
jesse at bestpractical.com
Sun Dec 3 14:11:32 EST 2006
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 ;)
On Sun, Dec 03, 2006 at 10:57:34AM -0500, jifty-commit at lists.jifty.org wrote:
> Author: audreyt
> Date: Sun Dec 3 10:57:34 2006
> New Revision: 2305
>
> Modified:
> Template-Declare/lib/Template/Declare/Tags.pm
>
> Log:
> * Template::Declare::Tags - Encode HTML attributes with underscores:
>
> # Single underscore: http_equiv ====> http-equiv
> meta {{ http_equiv is "Refresh", content is "0; $url" }};
>
> # Double underscore: xml__lang ====> xml:lang
> body {{ xml__lang is 'x-lojban' }};
>
>
> Modified: Template-Declare/lib/Template/Declare/Tags.pm
> ==============================================================================
> --- Template-Declare/lib/Template/Declare/Tags.pm (original)
> +++ Template-Declare/lib/Template/Declare/Tags.pm Sun Dec 3 10:57:34 2006
> @@ -115,6 +115,10 @@
>
> my $field = our $AUTOLOAD;
> $field =~ s/.*:://;
> +
> + $field =~ s/__/:/g; # xml__lang is 'foo' ====> xml:lang="foo"
> + $field =~ s/_/-/g; # http_equiv is 'bar' ====> http-equiv="bar"
> +
> my $val = "@_";
>
> use bytes;
> _______________________________________________
> Jifty-commit mailing list
> Jifty-commit at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-commit
>
--
More information about the jifty-devel
mailing list