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

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Aug 12 23:08:10 EDT 2007


Author: agentz
Date: Sun Aug 12 23:08:09 2007
New Revision: 3868

Modified:
   Template-Declare/Changes
   Template-Declare/lib/Template/Declare.pm
   Template-Declare/lib/Template/Declare/Tags.pm

Log:
TD - documented @Template::Declare::Tags::TagSubs

Modified: Template-Declare/Changes
==============================================================================
--- Template-Declare/Changes	(original)
+++ Template-Declare/Changes	Sun Aug 12 23:08:09 2007
@@ -1,3 +1,6 @@
+0.26 - 2007-08-13
+* 
+
 ----------------------------------------------------------------------
 r57045 (orig r3286):  jesse | 2007-05-22 15:58:58 -0400
 

Modified: Template-Declare/lib/Template/Declare.pm
==============================================================================
--- Template-Declare/lib/Template/Declare.pm	(original)
+++ Template-Declare/lib/Template/Declare.pm	Sun Aug 12 23:08:09 2007
@@ -37,11 +37,11 @@
 
 =head1 SYNOPSIS
 
-C<Template::Declare> is a pure-perl declarative HTML templating system. 
+C<Template::Declare> is a pure-perl declarative HTML/XUL/XML templating system.
 
 Yes.  Another one. There are many others like it, but this one is ours.
 
-A few key features and buzzwords
+A few key features and buzzwords:
 
 =over
 
@@ -51,6 +51,8 @@
 
 =item No angle brackets
 
+=item "Native" XML namespace and declarator support
+
 =item Mixins
 
 =item Inheritance
@@ -59,10 +61,8 @@
 
 =back
 
-
 =head1 USAGE
 
-
 =head2 Basic usage
 
     ##############################
@@ -545,7 +545,7 @@
 
 Crawling all over, baby. Be very, very careful. This code is so cutting edge, it can only be fashioned from carbon nanotubes.
 
-Some specific bugs and design flaws that we'd love to see fixed
+Some specific bugs and design flaws that we'd love to see fixed.
 
 =over
 

Modified: Template-Declare/lib/Template/Declare/Tags.pm
==============================================================================
--- Template-Declare/lib/Template/Declare/Tags.pm	(original)
+++ Template-Declare/lib/Template/Declare/Tags.pm	Sun Aug 12 23:08:09 2007
@@ -6,27 +6,24 @@
 
 package Template::Declare::Tags;
 
+our $VERSION = '0.26';
+
 use Template::Declare;
-use vars qw( @EXPORT @EXPORT_OK $PRIVATE $self );
+use vars qw( @EXPORT_OK $PRIVATE $self );
 use base 'Exporter';
 use Carp qw(carp croak);
 use Symbol 'qualify_to_ref';
 
- at EXPORT
+our @EXPORT
     = qw( with template private show show_page attr outs
           outs_raw in_isolation $self under
           get_current_attr xml_decl
           smart_tag_wrapper current_template );
-
-our $VERSION = '0.26';
-
-# XXX TODO: Put @TagSubs into POD
-# record all the subs for XML tags generated on-the-fly
 our @TagSubs;
 
 our %ATTRIBUTES       = ();
 our %ELEMENT_ID_CACHE = ();
-our $TAG_NEST_DEPTH            = 0;
+our $TAG_NEST_DEPTH   = 0;
 our @TEMPLATE_STACK;
 
 sub import {
@@ -79,7 +76,7 @@
 
 =head1 NAME
 
-Template::Declare::Tags
+Template::Declare::Tags - Tag subroutine builder for Template::Declare
 
 =head1 SYNOPSIS
 
@@ -371,11 +368,11 @@
     return '';
 }
 
-=head2 get_current_attr 
+=head2 get_current_attr
 
 Help! I'm deprecated/
 
-=cut 
+=cut
 
 sub get_current_attr ($) {
     $ATTRIBUTES{ $_[0] };
@@ -497,7 +494,7 @@
           $code->();
       };
   }
-  
+
   # use it
   with ( foo => 'bar', baz => 'bundy' ),
     sample_smart_tag {
@@ -679,13 +676,11 @@
     my $data = Template::Declare->buffer->data;
     Template::Declare->end_buffer_frame;
     %ELEMENT_ID_CACHE = ();    # We're done. we can clear the cache
-   if (not defined wantarray()) {  
-    
-    Template::Declare->buffer->append($data);
-    return undef;
+    if (not defined wantarray()) {
+        Template::Declare->buffer->append($data);
+        return undef;
      } else {
-    return $data;
-
+        return $data;
      }
 }
 
@@ -719,7 +714,7 @@
 
 =cut
 
-sub current_template { 
+sub current_template {
     return $TEMPLATE_STACK[-1] || '';
 }
 
@@ -787,9 +782,27 @@
 
 sub under ($) { return shift }
 
+=head1 VARIABLES
+
+=over
+
+=item C<< @Template::Declare::Tags::EXPORT >>
+
+Holds the names of the static subroutines exported by this class.
+tag subroutines generated from certain tag set, however,
+are not included here.
+
+=item C<< @Template::Declare::Tags::TagSubs >>
+
+Contains the names of the tag subroutines generated
+from certain tag set.
+
+=back
+
 =head1 SEE ALSO
 
-L<Template::Declare::TagSet::HTML>, L<Template::Declare::TagSet::XUL>, L<Template::Declare>.
+L<Template::Declare::TagSet::HTML>,
+L<Template::Declare::TagSet::XUL>, L<Template::Declare>.
 
 =head1 AUTHOR
 


More information about the Jifty-commit mailing list