[Jifty-commit] r3733 - in Template-Declare: lib/Template/Declare t
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Jul 29 17:35:17 EDT 2007
Author: jesse
Date: Sun Jul 29 17:35:16 2007
New Revision: 3733
Added:
Template-Declare/t/forms.t
Modified:
Template-Declare/ (props changed)
Template-Declare/META.yml
Template-Declare/lib/Template/Declare/Tags.pm
Log:
r64911 at pinglin: jesse | 2007-07-29 17:34:06 -0400
* Added support for the <form> tag (which we previously handled upstream. Thanks to jrockway.
Modified: Template-Declare/META.yml
==============================================================================
--- Template-Declare/META.yml (original)
+++ Template-Declare/META.yml Sun Jul 29 17:35:16 2007
@@ -20,4 +20,4 @@
Class::Accessor: 0
Class::Data::Inheritable: 0
perl: 5.6.0
-version: 0.21
+version: 0.25
Modified: Template-Declare/lib/Template/Declare/Tags.pm
==============================================================================
--- Template-Declare/lib/Template/Declare/Tags.pm (original)
+++ Template-Declare/lib/Template/Declare/Tags.pm Sun Jul 29 17:35:16 2007
@@ -218,7 +218,7 @@
map { $_ => +{} }
map {@{$_||[]}} @CGI::EXPORT_TAGS{qw/:html2 :html3 :html4 :netscape :form/}
);
-install_tag($_) for keys %TAGS;
+install_tag($_) for ((keys %TAGS), 'form') ;
=head2 with
Added: Template-Declare/t/forms.t
==============================================================================
--- (empty file)
+++ Template-Declare/t/forms.t Sun Jul 29 17:35:16 2007
@@ -0,0 +1,43 @@
+use warnings;
+use strict;
+
+
+package Wifty::UI;
+use base qw/Template::Declare/;
+use Template::Declare::Tags;
+use Test::More tests =>2 ;
+
+template simple => sub {
+
+html {
+ head { }
+ body {
+ form { attr { target => '/page.html', method => 'POST' };
+ input {
+ attr{ type => 'text'} };
+ }
+ }
+}
+
+};
+
+package Template::Declare::Tags;
+require "t/utils.pl";
+use Test::More;
+
+our $self;
+local $self = {};
+bless $self, 'Wifty::UI';
+
+Template::Declare->init( roots => ['Wifty::UI']);
+
+{
+Template::Declare->buffer->clear;
+my $simple =(show('simple'));
+ok($simple =~ '<form', "we have a form");
+diag ($simple);
+ok_lint($simple);
+}
+
+
+1;
More information about the Jifty-commit
mailing list