[Bps-public-commit] template-declare branch, master, updated. 7273259b8d14979b4948ea33f4e25683426e2ae1

Shawn Moore sartak at bestpractical.com
Fri Apr 15 14:18:16 EDT 2011


The branch, master has been updated
       via  7273259b8d14979b4948ea33f4e25683426e2ae1 (commit)
       via  cad6f4ee2ece735cc4143c29d04707e52bc9feb7 (commit)
       via  512c8e0cf80b27f7f4145d6e619a3aaa2c7005f0 (commit)
       via  d5a2b605b96558d80ecfa9a761e3f10c367813a3 (commit)
       via  8314f4194e1a1c8ce48f2c6386fe7effdda537df (commit)
       via  f4eea89acd922f584950287ce52809322bf41f8a (commit)
       via  93b4875f0f125b68cb935975ad310c33fe00ff9e (commit)
      from  f18cfc1e9154d9a0641c176225a5d3bf91914ad7 (commit)

Summary of changes:
 Changes                             |    3 +
 META.yml                            |    2 +-
 SIGNATURE                           |   18 +-
 lib/Template/Declare.pm             |    2 +-
 lib/Template/Declare/TagSet/HTML.pm |  340 ++++++++++++++++++++---------------
 lib/Template/Declare/Tags.pm        |    2 +-
 t/tagset_html.t                     |   12 ++-
 7 files changed, 224 insertions(+), 155 deletions(-)

- Log -----------------------------------------------------------------
commit 93b4875f0f125b68cb935975ad310c33fe00ff9e
Author: David E. Wheeler <david at justatheory.com>
Date:   Tue Mar 8 17:03:03 2011 -0800

    Add HTML 5 elements.

diff --git a/Changes b/Changes
index ad22fd7..666023f 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+0.45
+* Added new HTML 5 elements to the hTML Tag set. (Theory)
+
 0.44 2010-12-08
 * Added support for $TAG_INDENTATION and $EOL (Marc Chantreux)
 * Add a current_base_path() convenience function (trs)
diff --git a/lib/Template/Declare/TagSet/HTML.pm b/lib/Template/Declare/TagSet/HTML.pm
index e34e3a5..ad5f798 100644
--- a/lib/Template/Declare/TagSet/HTML.pm
+++ b/lib/Template/Declare/TagSet/HTML.pm
@@ -40,7 +40,9 @@ sub get_tag_list {
         radio_group popup_menu button autoescape scrolling_list image_button
         start_form end_form startform endform start_multipart_form
         end_multipart_form isindex tmpfilename uploadinfo url_encoded
-        multipart form canvas
+        multipart form canvas section article aside hgroup header footer nav
+        figure figcaption video audio embed mark progress meter time ruby rt
+        rp bdi wbr command details datalist keygen output
     )]
 }
 
@@ -371,6 +373,58 @@ Template::Declare::TagSet::HTML. Here is the complete list:
 
 =item C<canvas>
 
+=item C<section>
+
+=item C<article>
+
+=item C<aside>
+
+=item C<hgroup>
+
+=item C<header>
+
+=item C<footer>
+
+=item C<nav>
+
+=item C<figure>
+
+=item C<figcaption>
+
+=item C<video>
+
+=item C<audio>
+
+=item C<embed>
+
+=item C<mark>
+
+=item C<progress>
+
+=item C<meter>
+
+=item C<time>
+
+=item C<ruby>
+
+=item C<rt>
+
+=item C<rp>
+
+=item C<bdi>
+
+=item C<wbr>
+
+=item C<command>
+
+=item C<details>
+
+=item C<datalist>
+
+=item C<keygen>
+
+=item C<output>
+
 =back
 
 =head2 get_alternate_spelling( TAG )

commit f4eea89acd922f584950287ce52809322bf41f8a
Author: David E. Wheeler <david at justatheory.com>
Date:   Tue Mar 8 17:05:04 2011 -0800

    Add bullets to list items in Pod.

diff --git a/lib/Template/Declare/TagSet/HTML.pm b/lib/Template/Declare/TagSet/HTML.pm
index ad5f798..0a28194 100644
--- a/lib/Template/Declare/TagSet/HTML.pm
+++ b/lib/Template/Declare/TagSet/HTML.pm
@@ -119,311 +119,311 @@ Template::Declare::TagSet::HTML. Here is the complete list:
 
 =over
 
-=item C<h1>
+=item * C<h1>
 
-=item C<h2>
+=item * C<h2>
 
-=item C<h3>
+=item * C<h3>
 
-=item C<h4>
+=item * C<h4>
 
-=item C<h5>
+=item * C<h5>
 
-=item C<h6>
+=item * C<h6>
 
-=item C<p>
+=item * C<p>
 
-=item C<br>
+=item * C<br>
 
-=item C<hr>
+=item * C<hr>
 
-=item C<ol>
+=item * C<ol>
 
-=item C<ul>
+=item * C<ul>
 
-=item C<li>
+=item * C<li>
 
-=item C<dl>
+=item * C<dl>
 
-=item C<dt>
+=item * C<dt>
 
-=item C<dd>
+=item * C<dd>
 
-=item C<menu>
+=item * C<menu>
 
-=item C<code>
+=item * C<code>
 
-=item C<var>
+=item * C<var>
 
-=item C<strong>
+=item * C<strong>
 
-=item C<em>
+=item * C<em>
 
-=item C<tt>
+=item * C<tt>
 
-=item C<u>
+=item * C<u>
 
-=item C<i>
+=item * C<i>
 
-=item C<b>
+=item * C<b>
 
-=item C<blockquote>
+=item * C<blockquote>
 
-=item C<pre>
+=item * C<pre>
 
-=item C<img>
+=item * C<img>
 
-=item C<a>
+=item * C<a>
 
-=item C<address>
+=item * C<address>
 
-=item C<cite>
+=item * C<cite>
 
-=item C<samp>
+=item * C<samp>
 
-=item C<dfn>
+=item * C<dfn>
 
-=item C<html>
+=item * C<html>
 
-=item C<head>
+=item * C<head>
 
-=item C<base>
+=item * C<base>
 
-=item C<body>
+=item * C<body>
 
-=item C<link>
+=item * C<link>
 
-=item C<nextid>
+=item * C<nextid>
 
-=item C<title>
+=item * C<title>
 
-=item C<meta>
+=item * C<meta>
 
-=item C<kbd>
+=item * C<kbd>
 
-=item C<start_html>
+=item * C<start_html>
 
-=item C<end_html>
+=item * C<end_html>
 
-=item C<input>
+=item * C<input>
 
-=item C<select>
+=item * C<select>
 
-=item C<option>
+=item * C<option>
 
-=item C<comment>
+=item * C<comment>
 
-=item C<charset>
+=item * C<charset>
 
-=item C<escapehtml>
+=item * C<escapehtml>
 
-=item C<div>
+=item * C<div>
 
-=item C<table>
+=item * C<table>
 
-=item C<caption>
+=item * C<caption>
 
-=item C<th>
+=item * C<th>
 
-=item C<td>
+=item * C<td>
 
-=item C<tr>
+=item * C<tr>
 
-=item C<tr>
+=item * C<tr>
 
-=item C<sup>
+=item * C<sup>
 
-=item C<sub>
+=item * C<sub>
 
-=item C<strike>
+=item * C<strike>
 
-=item C<applet>
+=item * C<applet>
 
-=item C<param>
+=item * C<param>
 
-=item C<nobr>
+=item * C<nobr>
 
-=item C<embed>
+=item * C<embed>
 
-=item C<basefont>
+=item * C<basefont>
 
-=item C<style>
+=item * C<style>
 
-=item C<span>
+=item * C<span>
 
-=item C<layer>
+=item * C<layer>
 
-=item C<ilayer>
+=item * C<ilayer>
 
-=item C<font>
+=item * C<font>
 
-=item C<frameset>
+=item * C<frameset>
 
-=item C<frame>
+=item * C<frame>
 
-=item C<script>
+=item * C<script>
 
-=item C<small>
+=item * C<small>
 
-=item C<big>
+=item * C<big>
 
-=item C<area>
+=item * C<area>
 
-=item C<map>
+=item * C<map>
 
-=item C<abbr>
+=item * C<abbr>
 
-=item C<acronym>
+=item * C<acronym>
 
-=item C<bdo>
+=item * C<bdo>
 
-=item C<col>
+=item * C<col>
 
-=item C<colgroup>
+=item * C<colgroup>
 
-=item C<del>
+=item * C<del>
 
-=item C<fieldset>
+=item * C<fieldset>
 
-=item C<iframe>
+=item * C<iframe>
 
-=item C<ins>
+=item * C<ins>
 
-=item C<label>
+=item * C<label>
 
-=item C<legend>
+=item * C<legend>
 
-=item C<noframes>
+=item * C<noframes>
 
-=item C<noscript>
+=item * C<noscript>
 
-=item C<object>
+=item * C<object>
 
-=item C<optgroup>
+=item * C<optgroup>
 
-=item C<q>
+=item * C<q>
 
-=item C<thead>
+=item * C<thead>
 
-=item C<tbody>
+=item * C<tbody>
 
-=item C<tfoot>
+=item * C<tfoot>
 
-=item C<blink>
+=item * C<blink>
 
-=item C<fontsize>
+=item * C<fontsize>
 
-=item C<center>
+=item * C<center>
 
-=item C<textfield>
+=item * C<textfield>
 
-=item C<textarea>
+=item * C<textarea>
 
-=item C<filefield>
+=item * C<filefield>
 
-=item C<password_field>
+=item * C<password_field>
 
-=item C<hidden>
+=item * C<hidden>
 
-=item C<checkbox>
+=item * C<checkbox>
 
-=item C<checkbox_group>
+=item * C<checkbox_group>
 
-=item C<submit>
+=item * C<submit>
 
-=item C<reset>
+=item * C<reset>
 
-=item C<defaults>
+=item * C<defaults>
 
-=item C<radio_group>
+=item * C<radio_group>
 
-=item C<popup_menu>
+=item * C<popup_menu>
 
-=item C<button>
+=item * C<button>
 
-=item C<autoescape>
+=item * C<autoescape>
 
-=item C<scrolling_list>
+=item * C<scrolling_list>
 
-=item C<image_button>
+=item * C<image_button>
 
-=item C<start_form>
+=item * C<start_form>
 
-=item C<end_form>
+=item * C<end_form>
 
-=item C<startform>
+=item * C<startform>
 
-=item C<endform>
+=item * C<endform>
 
-=item C<start_multipart_form>
+=item * C<start_multipart_form>
 
-=item C<end_multipart_form>
+=item * C<end_multipart_form>
 
-=item C<isindex>
+=item * C<isindex>
 
-=item C<tmpfilename>
+=item * C<tmpfilename>
 
-=item C<uploadinfo>
+=item * C<uploadinfo>
 
-=item C<url_encoded>
+=item * C<url_encoded>
 
-=item C<multipart>
+=item * C<multipart>
 
-=item C<form>
+=item * C<form>
 
-=item C<canvas>
+=item * C<canvas>
 
-=item C<section>
+=item * C<section>
 
-=item C<article>
+=item * C<article>
 
-=item C<aside>
+=item * C<aside>
 
-=item C<hgroup>
+=item * C<hgroup>
 
-=item C<header>
+=item * C<header>
 
-=item C<footer>
+=item * C<footer>
 
-=item C<nav>
+=item * C<nav>
 
-=item C<figure>
+=item * C<figure>
 
-=item C<figcaption>
+=item * C<figcaption>
 
-=item C<video>
+=item * C<video>
 
-=item C<audio>
+=item * C<audio>
 
-=item C<embed>
+=item * C<embed>
 
-=item C<mark>
+=item * C<mark>
 
-=item C<progress>
+=item * C<progress>
 
-=item C<meter>
+=item * C<meter>
 
-=item C<time>
+=item * C<time>
 
-=item C<ruby>
+=item * C<ruby>
 
-=item C<rt>
+=item * C<rt>
 
-=item C<rp>
+=item * C<rp>
 
-=item C<bdi>
+=item * C<bdi>
 
-=item C<wbr>
+=item * C<wbr>
 
-=item C<command>
+=item * C<command>
 
-=item C<details>
+=item * C<details>
 
-=item C<datalist>
+=item * C<datalist>
 
-=item C<keygen>
+=item * C<keygen>
 
-=item C<output>
+=item * C<output>
 
 =back
 
@@ -446,25 +446,25 @@ C<< <tag /> >>. Currently, only a few HTML tags are allowed to be combined:
 
 =over
 
-=item C<base>
+=item * C<base>
 
-=item C<meta>
+=item * C<meta>
 
-=item C<link>
+=item * C<link>
 
-=item C<hr>
+=item * C<hr>
 
-=item C<br>
+=item * C<br>
 
-=item C<param>
+=item * C<param>
 
-=item C<img>
+=item * C<img>
 
-=item C<area>
+=item * C<area>
 
-=item C<input>
+=item * C<input>
 
-=item C<col>
+=item * C<col>
 
 =back
 

commit 8314f4194e1a1c8ce48f2c6386fe7effdda537df
Author: David E. Wheeler <david at justatheory.com>
Date:   Fri Apr 15 09:11:55 2011 -0700

    Map `<time>` to `<datetime>`.
    
    The `time` element is new in HTML 5. Map it to `datetime` to avoid conflicting
    with the core `time` function.

diff --git a/lib/Template/Declare/TagSet/HTML.pm b/lib/Template/Declare/TagSet/HTML.pm
index 0a28194..51985d4 100644
--- a/lib/Template/Declare/TagSet/HTML.pm
+++ b/lib/Template/Declare/TagSet/HTML.pm
@@ -10,6 +10,7 @@ our %AlternateSpelling = (
     td   => 'cell',
     base => 'html_base',
     q    => 'quote',
+    time => 'datetime',
 );
 
 sub get_alternate_spelling {
@@ -432,10 +433,11 @@ Template::Declare::TagSet::HTML. Here is the complete list:
     $bool = $obj->get_alternate_spelling($tag);
 
 Returns the alternative spelling for a given tag if any or undef otherwise.
-Currently, C<tr> is mapped to C<row>, C<td> is mapped to C<cell>, and C<base>
-is mapped to C<html_base>. These alternates are to avoid conflicts with the
-Perl operator C<tr> and the L<base|base> module, with C<td> changed so as to
-keep consistent with table rows.
+Currently, C<tr> is mapped to C<row>, C<td> is mapped to C<cell>, C<q> is
+mapped to C<quote>, C<base> is mapped to C<html_base>, and C<time> is mapped
+to C<datetime>. These alternates are to avoid conflicts with the Perl C<tr>
+and C<q> operators, the C<time> function, and the L<base|base> module, with
+C<td> changed so as to keep consistent with table rows.
 
 =head2 can_combine_empty_tags( TAG )
 

commit d5a2b605b96558d80ecfa9a761e3f10c367813a3
Author: David E. Wheeler <david at justatheory.com>
Date:   Fri Apr 15 09:25:19 2011 -0700

    Don't generate `time`.
    
    The code to protect from this is kind of hinky, but it is what it is,
    at least for now.

diff --git a/lib/Template/Declare/Tags.pm b/lib/Template/Declare/Tags.pm
index e07ee54..b978985 100644
--- a/lib/Template/Declare/Tags.pm
+++ b/lib/Template/Declare/Tags.pm
@@ -528,7 +528,7 @@ sub install_tag {
         );
         ### Exporting place-holder sub: $name
         # XXX TODO: more checking here
-        if ($name !~ /^(?:base|tr)$/) {
+        if ($name !~ /^(?:base|tr|time)$/) {
             push @EXPORT, $name;
             push @TAG_SUB_LIST, $name;
         }
diff --git a/t/tagset_html.t b/t/tagset_html.t
index c0cd334..a92b637 100644
--- a/t/tagset_html.t
+++ b/t/tagset_html.t
@@ -5,14 +5,19 @@ package MyApp::Templates;
 
 use base 'Template::Declare';
 use Template::Declare::Tags qw/ HTML /;
+my $time;
 
 template main => sub {
+    $time = time;
     caption { attr { id => 'a' } }
     link {};
     table {
         row {
             cell { "Hello, world!" }
-        }
+        };
+        row {
+            cell { datetime { $time } };
+        };
     }
     img { attr { src => 'cat.gif' } }
     label {}
@@ -38,6 +43,11 @@ is $out, <<_EOC_;
  <tr>
   <td>Hello, world!</td>
  </tr>
+ <tr>
+  <td>
+   <time>$time</time>
+  </td>
+ </tr>
 </table>
 <img src="cat.gif" />
 <label></label>

commit 512c8e0cf80b27f7f4145d6e619a3aaa2c7005f0
Merge: f18cfc1 d5a2b60
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Apr 15 13:54:03 2011 -0400

    Merge remote branch 'theory/html5'


commit cad6f4ee2ece735cc4143c29d04707e52bc9feb7
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Apr 15 14:15:01 2011 -0400

    0.45 Changes

diff --git a/Changes b/Changes
index 666023f..7b31cfe 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,5 @@
-0.45
-* Added new HTML 5 elements to the hTML Tag set. (Theory)
+0.45 2011-04-15
+* Added new HTML 5 elements to the HTML Tag set. (Theory)
 
 0.44 2010-12-08
 * Added support for $TAG_INDENTATION and $EOL (Marc Chantreux)

commit 7273259b8d14979b4948ea33f4e25683426e2ae1
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Apr 15 14:15:52 2011 -0400

    0.45; META.yml; regen signature

diff --git a/META.yml b/META.yml
index eeaf882..e80515e 100644
--- a/META.yml
+++ b/META.yml
@@ -28,4 +28,4 @@ requires:
   perl: 5.8.2
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.44
+version: 0.45
diff --git a/SIGNATURE b/SIGNATURE
index 239dcc8..6976e38 100644
--- a/SIGNATURE
+++ b/SIGNATURE
@@ -14,10 +14,10 @@ not run its Makefile.PL or Build.PL.
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 bea50ba2a1ec3c02864b92948ab28c1b525646ae Changes
+SHA1 229e9d22495ced90449f67a93df813c185250269 Changes
 SHA1 8da2ce69008bcb411301caba38aeed06d94aff41 MANIFEST
 SHA1 6c79a8c5140fc8b0146fbc8f77acc613797eeb6f MANIFEST.SKIP
-SHA1 d39dd57d522a3fbbc56a138af2a7bf1d0c81aced META.yml
+SHA1 9c889d95945f64dd7d159944d21d3b2760390046 META.yml
 SHA1 ee899bc436e17646223925d431d3e9727c1254d1 Makefile.PL
 SHA1 6b14974531d0b5bfad494febf88d6e43f1a1de12 README
 SHA1 20c73697e1713638140c719d8eaa19a275ed43a5 inc/Module/AutoInstall.pm
@@ -31,14 +31,14 @@ SHA1 b721c93ca5bc9a6aa863b49af15f1b1de6125935 inc/Module/Install/Makefile.pm
 SHA1 026cc0551a0ad399d195e395b46bdf842e115192 inc/Module/Install/Metadata.pm
 SHA1 5457015ea5a50e93465bf2dafa29feebd547f85b inc/Module/Install/Win32.pm
 SHA1 051e7fa8063908befa3440508d0584a2497b97db inc/Module/Install/WriteAll.pm
-SHA1 32b5a4c5a0f15af69f1a2bc1066f5f604502b241 lib/Template/Declare.pm
+SHA1 abce91386f0010f7d0a21ae294dbc479826e498f lib/Template/Declare.pm
 SHA1 4202a05659532bea1d800bc7296d9c1312624f9b lib/Template/Declare/Buffer.pm
 SHA1 c86b1e4749f76137c854358f496e8a8030d39fe7 lib/Template/Declare/TagSet.pm
-SHA1 bd39d582e69e0725124a0ffcee10c5d12a2377b3 lib/Template/Declare/TagSet/HTML.pm
+SHA1 3db3c3d4ecf402d8309014d2bb703eddeb100846 lib/Template/Declare/TagSet/HTML.pm
 SHA1 c1703c1f999d27878117e0aaf59dcae1d9d98645 lib/Template/Declare/TagSet/RDF.pm
 SHA1 8ba58a5c640010febb799bb03b7857eda34c86bc lib/Template/Declare/TagSet/RDF/EM.pm
 SHA1 2941a453d2627e0c0c02b8f50e7600c648867831 lib/Template/Declare/TagSet/XUL.pm
-SHA1 63cf6e9db9d122f0714589ae20869fa968e11f3c lib/Template/Declare/Tags.pm
+SHA1 e58cac12b1f429e78723c147090746841b3a3065 lib/Template/Declare/Tags.pm
 SHA1 f01b9a79b8f508729ce33693f0bb58d9cce54a3f t/99-pod-coverage.t
 SHA1 332d20b7b38fc5728b89d46b80f5b4e9e0ce4e29 t/99-pod.t
 SHA1 8de6d59c7ed7c771f9cdc5e2dbaef0c31c7ab439 t/MyTagSet.pm
@@ -81,7 +81,7 @@ SHA1 b4e187860320bbcdffa8036a76b47752521fb1ff t/strict.t
 SHA1 5a4d6002efea9daf71d3d291bf2a35751a51cba8 t/subclassing.t
 SHA1 679b39abb4812ca1c61ad9e9dd3f5aab97f8829c t/subtemplates.t
 SHA1 44f81200ec38ebf8bc9c836e34942f70990e7207 t/tag_sub_list.t
-SHA1 706c1919716723253eb62dc79b094dd48b7815ad t/tagset_html.t
+SHA1 72fcdef5a4a16376dcb45b858864652a44287d17 t/tagset_html.t
 SHA1 17263784a1a80112896cd157de834709a387fbff t/tagset_mix.t
 SHA1 cb48ee69151cf5b07ef19f4b2c727cb5580b1471 t/tagset_rdf.t
 SHA1 d6b90c5e540749b6f2b7ffa9f6ae84838a234503 t/tagset_rdf_em.t
@@ -94,7 +94,7 @@ SHA1 7bdcccbdd5253f4eae12d3c279183e10577a0184 t/xss.t
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (Darwin)
 
-iEYEARECAAYFAkz/2UAACgkQsxfQtHhyRPoQkQCfXdF9WZ19xP9Gf0aT4WMN6gnP
-+UwAniwBytP+w9P9gy9zFEC6R5eFRr8+
-=jHQM
+iEYEARECAAYFAk2oi4UACgkQsxfQtHhyRPqOVwCeOT81Lxrg0OW20K9UtKZldRBR
+eWoAnixLN/tIa5iKIlMojG9YqAWsERyG
+=bSv7
 -----END PGP SIGNATURE-----
diff --git a/lib/Template/Declare.pm b/lib/Template/Declare.pm
index 7c0323c..5ed04f6 100644
--- a/lib/Template/Declare.pm
+++ b/lib/Template/Declare.pm
@@ -7,7 +7,7 @@ use Template::Declare::Buffer;
 use Class::ISA;
 use String::BufferStack;
 
-our $VERSION = '0.44';
+our $VERSION = '0.45';
 
 use base 'Class::Data::Inheritable';
 __PACKAGE__->mk_classdata('dispatch_to');

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list