r46679 - in /trunk/libtemplate-declare-perl: Changes MANIFEST SIGNATURE debian/changelog lib/Template/Declare.pm lib/Template/Declare/TagSet.pm lib/Template/Declare/Tags.pm t/strict.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Mon Nov 2 22:16:10 UTC 2009


Author: gregoa
Date: Mon Nov  2 22:15:52 2009
New Revision: 46679

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46679
Log:
* New upstream release 0.42.

Added:
    trunk/libtemplate-declare-perl/t/strict.t
      - copied unchanged from r46678, branches/upstream/libtemplate-declare-perl/current/t/strict.t
Modified:
    trunk/libtemplate-declare-perl/Changes
    trunk/libtemplate-declare-perl/MANIFEST
    trunk/libtemplate-declare-perl/SIGNATURE
    trunk/libtemplate-declare-perl/debian/changelog
    trunk/libtemplate-declare-perl/lib/Template/Declare.pm
    trunk/libtemplate-declare-perl/lib/Template/Declare/TagSet.pm
    trunk/libtemplate-declare-perl/lib/Template/Declare/Tags.pm

Modified: trunk/libtemplate-declare-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtemplate-declare-perl/Changes?rev=46679&op=diff
==============================================================================
--- trunk/libtemplate-declare-perl/Changes (original)
+++ trunk/libtemplate-declare-perl/Changes Mon Nov  2 22:15:52 2009
@@ -1,3 +1,7 @@
+0.42 2009-11-01
+* Added the "strict" attribute to make exceptional situations fatal. (Theory)
+* Removed unused "implementor" attribute in Template::Declare::TagSet. (Theory)
+
 0.41 2009-10-29
 * Documentation tweaks (Theory)
 

Modified: trunk/libtemplate-declare-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtemplate-declare-perl/MANIFEST?rev=46679&op=diff
==============================================================================
--- trunk/libtemplate-declare-perl/MANIFEST (original)
+++ trunk/libtemplate-declare-perl/MANIFEST Mon Nov  2 22:15:52 2009
@@ -61,6 +61,7 @@
 t/siblings.t
 t/similar-aliases.t
 t/smart_tag_wrapper.t
+t/strict.t
 t/subclassing.t
 t/subtemplates.t
 t/tag_sub_list.t

Modified: trunk/libtemplate-declare-perl/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtemplate-declare-perl/SIGNATURE?rev=46679&op=diff
==============================================================================
--- trunk/libtemplate-declare-perl/SIGNATURE (original)
+++ trunk/libtemplate-declare-perl/SIGNATURE Mon Nov  2 22:15:52 2009
@@ -14,8 +14,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 b0a4d3b5bacd1c1ae7022f77379f704c42f04f86 Changes
-SHA1 1bab0077b133b2d3cdd4d66ef63dafa3ef4adf67 MANIFEST
+SHA1 7cff9cc5fac2ce5a6a95ef53b1a7eec956e38cef Changes
+SHA1 a5d3db06dc839282824ffa638a6cfe2ffdee78a9 MANIFEST
 SHA1 6c79a8c5140fc8b0146fbc8f77acc613797eeb6f MANIFEST.SKIP
 SHA1 ab968279525d26d23e4bf76e3d15e4951f87996f META.yml
 SHA1 ee899bc436e17646223925d431d3e9727c1254d1 Makefile.PL
@@ -31,14 +31,14 @@
 SHA1 bd988ba3fb7eee0ad889eadc2f5338a8d98fc2a3 inc/Module/Install/Metadata.pm
 SHA1 e9aa83f3e8b16ccfce544a90a57b63b70a497759 inc/Module/Install/Win32.pm
 SHA1 ade2ac0b0246d4d8e28fa46942e53f6925abda46 inc/Module/Install/WriteAll.pm
-SHA1 01bc4e1b5e6731544a07ddebbefb995f0c7ace20 lib/Template/Declare.pm
+SHA1 bd3aacdeeec829929f7f9ab7c669510b6e315266 lib/Template/Declare.pm
 SHA1 4202a05659532bea1d800bc7296d9c1312624f9b lib/Template/Declare/Buffer.pm
-SHA1 2794aeecd4d243899d80881376502e5444664e55 lib/Template/Declare/TagSet.pm
+SHA1 c86b1e4749f76137c854358f496e8a8030d39fe7 lib/Template/Declare/TagSet.pm
 SHA1 bd39d582e69e0725124a0ffcee10c5d12a2377b3 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 c64560b8308421deffdc124d87d2f27f2c0b35d9 lib/Template/Declare/Tags.pm
+SHA1 f12037ad41f686043f0bfbb8e7a8ad643424b072 lib/Template/Declare/Tags.pm
 SHA1 238e8999db8b1a8221dcac8afbf0c60448670974 t/99-pod-coverage.t
 SHA1 bb0da54f2b3f2d7955baa41ee458cb3d1887f475 t/99-pod.t
 SHA1 8de6d59c7ed7c771f9cdc5e2dbaef0c31c7ab439 t/MyTagSet.pm
@@ -76,6 +76,7 @@
 SHA1 771c903ee077531f0829b9d4efda1ca4fbd2fdfd t/siblings.t
 SHA1 31a78875cd464b5b2c21cee53c5498c97c395ebb t/similar-aliases.t
 SHA1 fe981469874ceb8b32100e82559d5eea14db3259 t/smart_tag_wrapper.t
+SHA1 3827af507d9d6f29c64be94d1444d6c146ece611 t/strict.t
 SHA1 5a4d6002efea9daf71d3d291bf2a35751a51cba8 t/subclassing.t
 SHA1 679b39abb4812ca1c61ad9e9dd3f5aab97f8829c t/subtemplates.t
 SHA1 44f81200ec38ebf8bc9c836e34942f70990e7207 t/tag_sub_list.t
@@ -92,7 +93,7 @@
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.7 (Darwin)
 
-iD8DBQFK6eivsxfQtHhyRPoRApQpAJ9ed3HQZaHJpNJqx7Q4FAQfIZQMVACePkQ2
-yDQgnPWhv7oNpYKl/cMI/M4=
-=HEfH
+iD8DBQFK7fTjsxfQtHhyRPoRAoS6AJ4tPTryahUgXsB7i655g8PN6YVF3QCeKeVK
+04wL4T14yJ+WzU5iR0ILz+o=
+=oL96
 -----END PGP SIGNATURE-----

Modified: trunk/libtemplate-declare-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtemplate-declare-perl/debian/changelog?rev=46679&op=diff
==============================================================================
--- trunk/libtemplate-declare-perl/debian/changelog (original)
+++ trunk/libtemplate-declare-perl/debian/changelog Mon Nov  2 22:15:52 2009
@@ -1,11 +1,15 @@
-libtemplate-declare-perl (0.41-1) unstable; urgency=low
+libtemplate-declare-perl (0.42-1) UNRELEASED; urgency=low
 
-  * New upstream release
+  [ Jonathan Yu ]
+  * New upstream release 0.41
   * Added a NEWS file to mention deprecated stuff
   * Rewrote control description
   * Standards-Version 3.8.3 (drop perl version dep)
   * Use short debhelper 7 rules format
   * Update upstream years of copyright per README
+
+  [ gregor herrmann ]
+  * New upstream release 0.42.
 
  -- Jonathan Yu <jawnsy at cpan.org>  Sat, 31 Oct 2009 10:24:12 -0400
 

Modified: trunk/libtemplate-declare-perl/lib/Template/Declare.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtemplate-declare-perl/lib/Template/Declare.pm?rev=46679&op=diff
==============================================================================
--- trunk/libtemplate-declare-perl/lib/Template/Declare.pm (original)
+++ trunk/libtemplate-declare-perl/lib/Template/Declare.pm Mon Nov  2 22:15:52 2009
@@ -7,11 +7,12 @@
 use Class::ISA;
 use String::BufferStack;
 
-our $VERSION = '0.41';
+our $VERSION = '0.42';
 
 use base 'Class::Data::Inheritable';
 __PACKAGE__->mk_classdata('dispatch_to');
 __PACKAGE__->mk_classdata('postprocessor');
+__PACKAGE__->mk_classdata('strict');
 __PACKAGE__->mk_classdata('templates');
 __PACKAGE__->mk_classdata('private_templates');
 __PACKAGE__->mk_classdata('buffer');
@@ -473,6 +474,7 @@
     Template::Declare->init(
         dispatch_to   => ['MyApp::Templates'],
         postprocessor => \&emphasize,
+        strict        => 1,
     );
 
     print Template::Declare->show( 'before' );
@@ -1056,6 +1058,12 @@
         warn "Rendering $path took " . (time - $start) . " seconds.";
     });
 
+=item strict
+
+Die in exceptional situations, such as when a template can't be found, rather
+than just warn. False by default for backward compatibility. The default may
+be changed in the future, so specifying the value explicitly is recommended.
+
 =back
 
 =cut
@@ -1064,20 +1072,15 @@
     my $class = shift;
     my %args  = (@_);
 
-    if ( $args{'dispatch_to'} ) {
-        $class->dispatch_to( $args{'dispatch_to'} );
-    } elsif ( $args{'roots'} ) {
-        $class->roots( $args{'roots'} );
+    if ( $args{dispatch_to} ) {
+        $class->dispatch_to( $args{dispatch_to} );
+    } elsif ( $args{roots} ) {
+        $class->roots( $args{roots} );
     }
 
-    if ( $args{'postprocessor'} ) {
-        $class->postprocessor( $args{'postprocessor'} );
-    }
-
-    if ( $args{'around_template'} ) {
-        $class->around_template( $args{'around_template'} );
-    }
-
+    $class->strict( $args{strict} ) if exists $args{strict};
+    $class->postprocessor( $args{postprocessor} ) if $args{postprocessor};
+    $class->around_template( $args{around_template} ) if $args{around_template};
 }
 
 =head2 show TEMPLATE_NAME

Modified: trunk/libtemplate-declare-perl/lib/Template/Declare/TagSet.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtemplate-declare-perl/lib/Template/Declare/TagSet.pm?rev=46679&op=diff
==============================================================================
--- trunk/libtemplate-declare-perl/lib/Template/Declare/TagSet.pm (original)
+++ trunk/libtemplate-declare-perl/lib/Template/Declare/TagSet.pm Mon Nov  2 22:15:52 2009
@@ -5,7 +5,7 @@
 use base qw(Class::Accessor::Fast);
 
 __PACKAGE__->mk_ro_accessors(
-    qw{ namespace package implementor }
+    qw{ namespace package }
 );
 
 sub get_alternate_spelling {

Modified: trunk/libtemplate-declare-perl/lib/Template/Declare/Tags.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtemplate-declare-perl/lib/Template/Declare/Tags.pm?rev=46679&op=diff
==============================================================================
--- trunk/libtemplate-declare-perl/lib/Template/Declare/Tags.pm (original)
+++ trunk/libtemplate-declare-perl/lib/Template/Declare/Tags.pm Mon Nov  2 22:15:52 2009
@@ -6,7 +6,7 @@
 
 package Template::Declare::Tags;
 
-our $VERSION = '0.41';
+our $VERSION = '0.42';
 
 use Template::Declare;
 use base 'Exporter';
@@ -465,8 +465,9 @@
 
         if ( lc($key) eq 'id' ) {
             if ( $ELEMENT_ID_CACHE{$val}++ ) {
-                warn
-                    "HTML appears to contain illegal duplicate element id: $val";
+                my $msg = "HTML appears to contain illegal duplicate element id: $val";
+                die $msg if Template::Declare->strict;
+                warn $msg;
             }
         }
 
@@ -866,6 +867,7 @@
     unless ($callable) {
         my $msg = "The template '$template' could not be found";
         $msg .= " (it might be private)" if !$inside_template;
+        croak $msg if Template::Declare->strict;
         carp $msg;
         return '';
     }




More information about the Pkg-perl-cvs-commits mailing list