[Jifty-commit] r3127 - in Template-Declare: lib/Template

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Apr 15 11:05:24 EDT 2007


Author: jesse
Date: Sun Apr 15 11:05:23 2007
New Revision: 3127

Added:
   Template-Declare/Changes
Modified:
   Template-Declare/   (props changed)
   Template-Declare/MANIFEST
   Template-Declare/META.yml
   Template-Declare/lib/Template/Declare.pm

Log:
 r55435 at pinglin:  jesse | 2007-04-15 11:03:34 -0400
 * Bumped the version, added a Changelog


Added: Template-Declare/Changes
==============================================================================
--- (empty file)
+++ Template-Declare/Changes	Sun Apr 15 11:05:23 2007
@@ -0,0 +1,547 @@
+----------------------------------------------------------------------
+r54526 (orig r3102):  jesse | 2007-04-06 10:07:35 -0400
+
+ r54525 at dhcp207:  jesse | 2007-04-06 23:07:11 +0900
+  * duplicate id tests.
+
+----------------------------------------------------------------------
+r54524 (orig r3101):  jesse | 2007-04-06 10:04:34 -0400
+
+ r54523 at dhcp207:  jesse | 2007-04-06 23:04:19 +0900
+ * Patch from gugod++ to perform detection of duplicate html id elements
+
+----------------------------------------------------------------------
+r54518 (orig r3100):  jesse | 2007-04-06 06:36:26 -0400
+
+ r54517 at dhcp207:  jesse | 2007-04-06 19:36:06 +0900
+ * Better handling of 'private' templates for gugod
+
+----------------------------------------------------------------------
+r54400 (orig r3076):  jesse | 2007-03-31 21:49:35 -0400
+
+ r54399 at pinglin:  jesse | 2007-03-31 18:49:21 -0700
+  * This broke nav menus on live. i suck
+
+----------------------------------------------------------------------
+r54394 (orig r3074):  jesse | 2007-03-31 21:20:45 -0400
+
+ r54393 at pinglin:  jesse | 2007-03-31 18:20:31 -0700
+ * more work on closures 
+
+----------------------------------------------------------------------
+r54390 (orig r3073):  jesse | 2007-03-31 03:21:23 -0400
+
+ r54389 at pinglin:  jesse | 2007-03-31 00:19:30 -0700
+ * Closer to right handling of embedded tags as closures.  I think all that's left is stringification.
+ 
+
+----------------------------------------------------------------------
+r54260 (orig r3071):  jesse | 2007-03-28 01:51:18 -0400
+
+ r54259 at pinglin:  jesse | 2007-03-27 22:50:53 -0700
+  * So sad. this broke live apps
+
+----------------------------------------------------------------------
+r54257 (orig r3070):  jesse | 2007-03-27 23:21:29 -0400
+
+ r54255 at pinglin:  jesse | 2007-03-27 20:20:21 -0700
+ * Tests for closures
+
+----------------------------------------------------------------------
+r54256 (orig r3069):  jesse | 2007-03-27 23:21:18 -0400
+
+ r54254 at pinglin:  jesse | 2007-03-27 20:18:21 -0700
+ * Getting closer to supporting closures of tags.
+
+----------------------------------------------------------------------
+r54253 (orig r3068):  jesse | 2007-03-27 17:47:21 -0400
+
+ r54252 at pinglin:  jesse | 2007-03-27 14:41:20 -0700
+ * Refactoring outs to make tags into closures
+
+----------------------------------------------------------------------
+r54250 (orig r3067):  ruz | 2007-03-27 13:43:19 -0400
+
+* idea about adding attributes to all tags on one level
+  is good, but 'with' is not good candidate for that.
+  Fix a test to according to the current behaviour.
+----------------------------------------------------------------------
+r54248 (orig r3066):  ruz | 2007-03-27 06:56:33 -0400
+
+* change prototype of attr function so all tag functions
+  on the same level are called in array context. This
+  fixes a failing test in t/attributes.t
+----------------------------------------------------------------------
+r54247 (orig r3065):  ruz | 2007-03-27 06:25:10 -0400
+
+* clear buffer after each test
+----------------------------------------------------------------------
+r54246 (orig r3064):  ruz | 2007-03-26 22:40:29 -0400
+
+* tests for attributes
+----------------------------------------------------------------------
+r53849 (orig r3057):  clkao | 2007-03-24 14:10:55 -0400
+
+rollback r3052 as it's breaking multiroot resolution.
+----------------------------------------------------------------------
+r53844 (orig r3052):  clkao | 2007-03-23 22:22:25 -0400
+
+When calling show, look at the current context rather than global.
+This breaks a test that is arguably wrong by introducing collision.
+
+----------------------------------------------------------------------
+r53842 (orig r3050):  clkao | 2007-03-23 21:56:01 -0400
+
+path_for method to do resolution for imported templates.
+----------------------------------------------------------------------
+r53531 (orig r2989):  evdb | 2007-03-16 05:15:53 -0400
+
+Added function 'smart_tag_wrapper' that allows tags to be created that have access to the ATTRIBUTES set using 'with'. It attempts to hide most of the complexity of the call from the user and tidies up after itself.
+
+----------------------------------------------------------------------
+r53454 (orig r2971):  evdb | 2007-03-15 12:30:44 -0400
+
+Added 'Test::More' build dependency
+----------------------------------------------------------------------
+r53453 (orig r2970):  evdb | 2007-03-15 12:27:59 -0400
+
+Added carped warning when you try to 'show' a template that either does not exist or is private and so cannot be used.
+
+----------------------------------------------------------------------
+r52916 (orig r2885):  jesse | 2007-03-03 04:17:27 -0500
+
+ r52903 at 152:  jesse | 2007-03-03 00:54:03 +0000
+ 0.06
+
+----------------------------------------------------------------------
+r50024 (orig r2877):  jesse | 2007-03-01 12:27:25 -0500
+
+ r49940 at pinglin:  jesse | 2007-03-01 12:26:05 -0500
+  * Added missing dependency on Class::Accessor
+
+----------------------------------------------------------------------
+r48608 (orig r2869):  jesse | 2007-02-28 14:53:40 -0500
+
+ r48606 at pinglin:  jesse | 2007-02-28 14:53:09 -0500
+ * signature for 0.03
+
+----------------------------------------------------------------------
+r48607 (orig r2868):  jesse | 2007-02-28 14:53:33 -0500
+
+ r48605 at pinglin:  jesse | 2007-02-28 14:49:48 -0500
+ * 0.03
+
+----------------------------------------------------------------------
+r48508 (orig r2833):  jesse | 2007-02-23 17:30:09 -0500
+
+ r48504 at 233:  jesse | 2007-02-23 17:24:34 -0500
+ * Better warnings when invalid things get shoved in your Template::Declare root list
+
+----------------------------------------------------------------------
+r47589 (orig r2760):  audreyt | 2007-02-07 22:45:56 -0500
+
+* Buffer.pm: Fix the bug where existing content '0' will be eaten away;
+  also squash warnings.
+----------------------------------------------------------------------
+r47588 (orig r2759):  clkao | 2007-02-07 03:29:02 -0500
+
+* Fix $self for importing.
+* Rename import to import_templates for now as it's conflicting with
+  jifty::view::declare's import.
+
+----------------------------------------------------------------------
+r47583 (orig r2754):  jesse | 2007-02-05 23:14:33 -0500
+
+ r21797 at hualien:  jesse | 2007-02-06 17:11:57 +1300
+  * Switched from Template::Declare::BUFFER to a buffer object
+
+----------------------------------------------------------------------
+r47413 (orig r2584):  jesse | 2007-01-26 07:00:12 -0500
+
+ r21351 at hualien:  jesse | 2007-01-26 19:46:44 +0800
+  * deprecated too soon
+
+----------------------------------------------------------------------
+r47406 (orig r2577):  audreyt | 2007-01-26 06:41:29 -0500
+
+* More misc releng fix.
+----------------------------------------------------------------------
+r47405 (orig r2576):  audreyt | 2007-01-26 06:39:30 -0500
+
+* Makefile.PL - Modernize Module::Install usage, as well as listing HTML::Lint 
+  as build_requires() so that tests won't randomly fail.
+----------------------------------------------------------------------
+r47354 (orig r2525):  jesse | 2007-01-18 00:13:29 -0500
+
+ r21085 at hualien:  jesse | 2007-01-18 00:12:37 -0500
+  * 0.02
+
+----------------------------------------------------------------------
+r47352 (orig r2523):  jesse | 2007-01-18 00:07:08 -0500
+
+ r21082 at hualien:  jesse | 2007-01-18 00:06:05 -0500
+  * Module::Install update
+
+----------------------------------------------------------------------
+r47351 (orig r2522):  jesse | 2007-01-18 00:06:43 -0500
+
+ r21081 at hualien:  jesse | 2007-01-18 00:05:40 -0500
+  * Better test coverage
+
+----------------------------------------------------------------------
+r47350 (orig r2521):  jesse | 2007-01-17 23:29:12 -0500
+
+ r21079 at hualien:  jesse | 2007-01-17 23:28:57 -0500
+ * More docs!
+ * pod testing
+
+----------------------------------------------------------------------
+r47335 (orig r2506):  jesse | 2007-01-16 13:34:54 -0500
+
+ r21007 at hualien:  jesse | 2007-01-16 13:23:33 -0500
+  *0.01_01
+
+----------------------------------------------------------------------
+r47332 (orig r2503):  jesse | 2007-01-15 21:18:02 -0500
+
+ r21001 at hualien:  jesse | 2007-01-15 21:17:57 -0500
+ * that local should have been a my
+
+----------------------------------------------------------------------
+r47331 (orig r2502):  jesse | 2007-01-15 20:59:31 -0500
+
+ r20995 at hualien:  jesse | 2007-01-15 20:57:42 -0500
+ * doc
+
+----------------------------------------------------------------------
+r47330 (orig r2501):  jesse | 2007-01-15 20:59:25 -0500
+
+ r20994 at hualien:  jesse | 2007-01-15 20:57:36 -0500
+ * tests for aliasing
+
+----------------------------------------------------------------------
+r47329 (orig r2500):  jesse | 2007-01-15 20:59:10 -0500
+
+ r20993 at hualien:  jesse | 2007-01-15 18:56:56 -0500
+  Evil, evil, evil tricks to make self the right packagename
+
+----------------------------------------------------------------------
+r47328 (orig r2499):  jesse | 2007-01-15 20:58:56 -0500
+
+ r20992 at hualien:  jesse | 2007-01-15 17:58:08 -0500
+  * refactoring for readability
+
+----------------------------------------------------------------------
+r47327 (orig r2498):  jesse | 2007-01-15 20:58:25 -0500
+
+ r20991 at hualien:  jesse | 2007-01-15 17:57:23 -0500
+  * refactoring for readability
+
+----------------------------------------------------------------------
+r47326 (orig r2497):  jesse | 2007-01-15 17:04:23 -0500
+
+ r20989 at hualien:  jesse | 2007-01-15 17:03:19 -0500
+ * work on making sure there's a $self available to the template
+
+----------------------------------------------------------------------
+r47325 (orig r2496):  jesse | 2007-01-15 16:15:15 -0500
+
+ r20985 at hualien:  jesse | 2007-01-15 16:11:22 -0500
+  * refactoring the tests utility fucntions
+
+----------------------------------------------------------------------
+r47324 (orig r2495):  jesse | 2007-01-15 15:56:41 -0500
+
+ r20982 at hualien:  jesse | 2007-01-15 15:54:40 -0500
+ * allow imported subclass items
+
+----------------------------------------------------------------------
+r47323 (orig r2494):  jesse | 2007-01-15 15:56:29 -0500
+
+ r20981 at hualien:  jesse | 2007-01-15 15:52:48 -0500
+ * Remove code that had been abstracted to a function
+
+----------------------------------------------------------------------
+r46838 (orig r2475):  clkao | 2007-01-06 06:55:43 -0500
+
+Change has_template to lookup only in calling pkg unless used with Template::Declare itself.
+----------------------------------------------------------------------
+r46837 (orig r2474):  clkao | 2007-01-06 05:13:34 -0500
+
+failing tests for imported template that uses base.
+----------------------------------------------------------------------
+r46836 (orig r2473):  clkao | 2007-01-06 05:09:28 -0500
+
+failing tests expecting correct $self in template blocks.
+----------------------------------------------------------------------
+r46769 (orig r2467):  jesse | 2007-01-05 01:03:22 -0500
+
+ r46767 at pinglin:  jesse | 2007-01-05 01:02:30 -0500
+ * Importing semantics deployed
+
+----------------------------------------------------------------------
+r46768 (orig r2466):  jesse | 2007-01-05 01:03:14 -0500
+
+ r46753 at pinglin:  jesse | 2007-01-04 23:21:33 -0500
+ * more work on import. it now _parses
+
+----------------------------------------------------------------------
+r46505 (orig r2425):  jesse | 2006-12-26 23:16:33 -0500
+
+ r46503 at pinglin:  jesse | 2006-12-26 23:16:22 -0500
+  * default to escaping user content
+
+----------------------------------------------------------------------
+r46504 (orig r2424):  jesse | 2006-12-26 23:16:23 -0500
+
+
+----------------------------------------------------------------------
+r46376 (orig r2415):  clkao | 2006-12-20 18:01:46 -0500
+
+plan for tests.
+----------------------------------------------------------------------
+r46375 (orig r2414):  clkao | 2006-12-20 17:59:32 -0500
+
+failing tests for non-toplevel templates.
+----------------------------------------------------------------------
+r46340 (orig r2410):  jesse | 2006-12-20 02:54:02 -0500
+
+ r46333 at dhcp64-134-35-102:  jesse | 2006-12-19 20:25:21 -0800
+  stray warning
+
+----------------------------------------------------------------------
+r46339 (orig r2409):  jesse | 2006-12-20 02:53:18 -0500
+
+ r46332 at dhcp64-134-35-102:  jesse | 2006-12-19 18:42:56 -0800
+ * only one private tempalte was permitted
+
+----------------------------------------------------------------------
+r46337 (orig r2408):  bartb | 2006-12-19 23:02:54 -0500
+
+typo fixes
+----------------------------------------------------------------------
+r46268 (orig r2406):  jesse | 2006-12-19 03:08:34 -0500
+
+ r46259 at pinglin:  jesse | 2006-12-19 03:02:51 -0500
+ * show is no longer called as a method
+ * better handling of client code calling templates with a leading /
+ 
+ r46267 at pinglin:  jesse | 2006-12-19 03:08:30 -0500
+ * warning avoidance
+
+----------------------------------------------------------------------
+r46256 (orig r2401):  jesse | 2006-12-18 19:45:48 -0500
+
+ r46255 at 185:  jesse | 2006-12-18 19:45:21 -0500
+  * Publish the resolve_template API
+
+----------------------------------------------------------------------
+r46224 (orig r2395):  jesse | 2006-12-16 22:48:26 -0500
+
+ r46221 at pinglin:  jesse | 2006-12-16 21:30:23 -0500
+ * Added support for multiple template roots to template::declare
+ 
+
+----------------------------------------------------------------------
+r46223 (orig r2394):  jesse | 2006-12-16 22:48:10 -0500
+
+ r46220 at pinglin:  jesse | 2006-12-16 21:18:51 -0500
+ * tests converted to use the ->init method.
+ 
+
+----------------------------------------------------------------------
+r46222 (orig r2393):  jesse | 2006-12-16 22:48:04 -0500
+
+ r46219 at pinglin:  jesse | 2006-12-16 20:44:13 -0500
+ * Removed the old inheritance system
+ 
+
+----------------------------------------------------------------------
+r46216 (orig r2390):  jesse | 2006-12-16 17:22:36 -0500
+
+ r46213 at 66:  jesse | 2006-12-16 12:57:42 -0800
+ * still not working right. 
+ * Code cleanup
+
+----------------------------------------------------------------------
+r46215 (orig r2389):  jesse | 2006-12-16 17:22:21 -0500
+
+ r46212 at 66:  jesse | 2006-12-16 12:41:51 -0800
+ * working templates with dots and dashes in their names. (Jifty apps now work again)
+
+----------------------------------------------------------------------
+r46214 (orig r2388):  jesse | 2006-12-16 17:22:05 -0500
+
+ r46211 at 66:  jesse | 2006-12-16 11:41:31 -0800
+ * Unbroke support for subtemplates
+
+----------------------------------------------------------------------
+r46084 (orig r2365):  jesse | 2006-12-10 21:15:46 -0500
+
+ r46081 at pinglin:  jesse | 2006-12-11 02:14:42 +0000
+ * _tests_ for private templates.
+ 
+
+----------------------------------------------------------------------
+r46083 (orig r2364):  jesse | 2006-12-10 21:15:34 -0500
+
+ r46080 at pinglin:  jesse | 2006-12-11 02:06:21 +0000
+  * private templates
+
+----------------------------------------------------------------------
+r46009 (orig r2347):  audreyt | 2006-12-08 10:01:27 -0500
+
+* Fix tests to agree with code ;)
+----------------------------------------------------------------------
+r46008 (orig r2346):  audreyt | 2006-12-08 10:00:54 -0500
+
+* Semicolon is now optional in T::D declarators:
+    p { }
+    p { }
+    p { }
+----------------------------------------------------------------------
+r46004 (orig r2343):  jesse | 2006-12-07 20:08:12 -0500
+
+ r46002 at pinglin:  jesse | 2006-12-07 18:13:57 +0000
+ * If we're used in an oo manner, don't blow away the caller's lexical
+
+----------------------------------------------------------------------
+r45865 (orig r2340):  audreyt | 2006-12-06 11:17:51 -0500
+
+* Template::Declare - Revert obra++'s treatment:
+
+    # default to <tag/> rather than <tag></tag> if there's no content
+
+  and added this comment:
+
+    # We should, in theory, default to <tag /> rather than <tag></tag> if there's no content,
+    # but until all we output is strict XHTML, "<iframe src='...' />" and "<a name='...' />"
+    # are rendered incorrectly by gecko -- they require the use of an explicit closing tag
+    # So intead of the correct treatment:
+    #
+    #   $BUFFER .= $buf." />";
+    #
+    # we supply a closing tag for now:
+    #
+    $BUFFER .= $buf."></$tag>";
+
+----------------------------------------------------------------------
+r45864 (orig r2339):  audreyt | 2006-12-06 11:01:26 -0500
+
+* Template::Declare::Tags: Support for all five style (all mixable):
+
+    div {{ id is 'moose' } span { 'Hi!' } };
+    div { attr { id is 'moose' } span { 'Hi!' } };
+    div { attr { id => 'moose' } span { 'Hi!' } };
+    div { attr { id is 'moose' }; span { 'Hi!' } };
+    div { attr { id => 'moose' }; span { 'Hi!' } };
+
+  The old style is still supported as well:
+
+    with(id => 'moose'), div { span { 'Hi!' } };
+
+----------------------------------------------------------------------
+r45862 (orig r2337):  jesse | 2006-12-06 02:23:17 -0500
+
+ r45839 at pinglin:  jesse | 2006-12-06 01:06:54 -0500
+ 
+ r45842 at pinglin:  jesse | 2006-12-06 02:13:13 -0500
+ * Added support for:
+ 
+ div {
+     attr( id => 'foo');
+     
+     outs('my text');
+ }
+     
+ In addition to the existing support for:
+ 
+ div {
+     {  id is 'foo' }
+     
+     outs('my text');
+ }
+     
+ Tested both.
+ 
+
+----------------------------------------------------------------------
+r45837 (orig r2336):  jesse | 2006-12-06 01:03:18 -0500
+
+t/trivial was failing tests because meta elements were being expanded to container nodes. which they are not.
+----------------------------------------------------------------------
+r45780 (orig r2305):  audreyt | 2006-12-03 10:57:34 -0500
+
+* 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' }};
+
+----------------------------------------------------------------------
+r45718 (orig r2251):  audreyt | 2006-12-01 05:26:17 -0500
+
+* T::D::Tags - Tidy up and avoid redefinition warning.
+----------------------------------------------------------------------
+r45716 (orig r2249):  audreyt | 2006-12-01 04:54:52 -0500
+
+* Template::Declare::Tags - Output "<tr>...</tr>" not "<Tr>...</Tr>"
+----------------------------------------------------------------------
+r45713 (orig r2246):  audreyt | 2006-12-01 03:58:26 -0500
+
+* Ditch the intermediate CURRENT_ATTRIBUTE structure; now all "attr is foo"
+  immediately emits attributes.
+----------------------------------------------------------------------
+r45711 (orig r2244):  audreyt | 2006-12-01 02:32:44 -0500
+
+* Template::Declare - Support for declarative "is" copula on attributes.
+  For example:
+
+    table {{width is '100%'} row {
+        cell {{width is '50%'} $search_region->render };
+        cell {{width is '50%'} $result_region->render };
+    } };
+
+----------------------------------------------------------------------
+r45655 (orig r2241):  audreyt | 2006-12-01 00:19:18 -0500
+
+* Template::Declare::Tags - More uniform treatment of hiding &base.
+----------------------------------------------------------------------
+r45654 (orig r2240):  audreyt | 2006-12-01 00:12:29 -0500
+
+* Template::Declare::Tags - Tr/td is now row/cell.
+----------------------------------------------------------------------
+r45588 (orig r2220):  audreyt | 2006-11-29 13:06:55 -0500
+
+* Template::Declare::Tags - hide the "base" declarator because it conflicts with -base
+  in import line when refreshing.
+----------------------------------------------------------------------
+r45584 (orig r2216):  audreyt | 2006-11-29 09:13:25 -0500
+
+* Template::Declare - new utility get_current_attr to get the with() context.
+* Also allow for qualified template declaration and show.
+----------------------------------------------------------------------
+r45583 (orig r2215):  audreyt | 2006-11-29 08:44:19 -0500
+
+* Template::Declare - Allow has_template('foo/bar') and has_template('foo::bar').
+* Also, negative version numbers is really hard to deploy.  Make it positive.
+----------------------------------------------------------------------
+r45133 (orig r2177):  clkao | 2006-11-18 19:15:24 -0500
+
+Export $self.
+----------------------------------------------------------------------
+r44901 (orig r2168):  jesse | 2006-11-15 23:55:49 -0500
+
+* License was typoed. -- Thanks to Matt Trout
+----------------------------------------------------------------------
+r44889 (orig r2167):  jesse | 2006-11-15 21:42:11 -0500
+
+  * Initial version of Template::Declare
+
+----------------------------------------------------------------------
+r44888 (orig r2166):  jesse | 2006-11-15 21:40:31 -0500
+
+
+----------------------------------------------------------------------

Modified: Template-Declare/MANIFEST
==============================================================================
--- Template-Declare/MANIFEST	(original)
+++ Template-Declare/MANIFEST	Sun Apr 15 11:05:23 2007
@@ -18,10 +18,14 @@
 t/99-pod.t
 t/aliasing.t
 t/arg-declaration-styles.t
+t/attributes.t
+t/closures.t
+t/duplicate_element_ids.t
 t/importing.t
 t/indexhtml.t
 t/private.t
 t/self.t
+t/smart_tag_wrapper.t
 t/subclassing.t
 t/subtemplates.t
 t/trivial.t

Modified: Template-Declare/META.yml
==============================================================================
--- Template-Declare/META.yml	(original)
+++ Template-Declare/META.yml	Sun Apr 15 11:05:23 2007
@@ -16,4 +16,4 @@
   Class::Accessor: 0
   Class::Data::Inheritable: 0
   perl: 5.6.0
-version: 0.06
+version: 0.07

Modified: Template-Declare/lib/Template/Declare.pm
==============================================================================
--- Template-Declare/lib/Template/Declare.pm	(original)
+++ Template-Declare/lib/Template/Declare.pm	Sun Apr 15 11:05:23 2007
@@ -6,7 +6,7 @@
 package Template::Declare;
 use Template::Declare::Buffer;
 
-$Template::Declare::VERSION = "0.06";
+$Template::Declare::VERSION = "0.07";
 
 use base 'Class::Data::Inheritable';
 __PACKAGE__->mk_classdata('roots');


More information about the Jifty-commit mailing list