r58313 - in /branches/upstream/libhtml-template-pro-perl/current: Changes MANIFEST META.yml Pro.xs README lib/HTML/Template/Pro.pm perl-HTML-Template-Pro.spec t/06loop_var.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sun May 23 14:51:07 UTC 2010


Author: gregoa
Date: Sun May 23 14:50:59 2010
New Revision: 58313

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58313
Log:
[svn-upgrade] Integrating new upstream version, libhtml-template-pro-perl (0.95)

Added:
    branches/upstream/libhtml-template-pro-perl/current/t/06loop_var.t
Modified:
    branches/upstream/libhtml-template-pro-perl/current/Changes
    branches/upstream/libhtml-template-pro-perl/current/MANIFEST
    branches/upstream/libhtml-template-pro-perl/current/META.yml
    branches/upstream/libhtml-template-pro-perl/current/Pro.xs
    branches/upstream/libhtml-template-pro-perl/current/README
    branches/upstream/libhtml-template-pro-perl/current/lib/HTML/Template/Pro.pm
    branches/upstream/libhtml-template-pro-perl/current/perl-HTML-Template-Pro.spec

Modified: branches/upstream/libhtml-template-pro-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-template-pro-perl/current/Changes?rev=58313&op=diff
==============================================================================
--- branches/upstream/libhtml-template-pro-perl/current/Changes (original)
+++ branches/upstream/libhtml-template-pro-perl/current/Changes Sun May 23 14:50:59 2010
@@ -280,3 +280,8 @@
 0.94 Tue Feb 16 16:58:39 EET 2010
 	- c lib 1.3 (4:0:3) ABI (see htmltmplpro/API for details)
 	- fixed lexer bug (thanks to Svetlana Safronova)
+
+0.95 Fri May 21 22:25:10 EEST 2010
+	- perl specific: fixed bug in perl wrapper
+	(list evaluated to false). thanks to Shigeki Morimoto 
+	for bugreport and patch.

Modified: branches/upstream/libhtml-template-pro-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-template-pro-perl/current/MANIFEST?rev=58313&op=diff
==============================================================================
--- branches/upstream/libhtml-template-pro-perl/current/MANIFEST (original)
+++ branches/upstream/libhtml-template-pro-perl/current/MANIFEST Sun May 23 14:50:59 2010
@@ -64,6 +64,7 @@
 t/03complex.t
 t/04register.t
 t/05path_like_variable_scope.t
+t/06loop_var.t
 t/HTML-Template-Expr.t
 t/HTML-Template-Pro.t
 t/HTML-Template.t

Modified: branches/upstream/libhtml-template-pro-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-template-pro-perl/current/META.yml?rev=58313&op=diff
==============================================================================
--- branches/upstream/libhtml-template-pro-perl/current/META.yml (original)
+++ branches/upstream/libhtml-template-pro-perl/current/META.yml Sun May 23 14:50:59 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               HTML-Template-Pro
-version:            0.94
+version:            0.95
 abstract:           Perl/XS module to use HTML Templates from CGI scripts
 author:
     - I. Yu. Vlasenko <viy at altlinux.org>

Modified: branches/upstream/libhtml-template-pro-perl/current/Pro.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-template-pro-perl/current/Pro.xs?rev=58313&op=diff
==============================================================================
--- branches/upstream/libhtml-template-pro-perl/current/Pro.xs (original)
+++ branches/upstream/libhtml-template-pro-perl/current/Pro.xs Sun May 23 14:50:59 2010
@@ -104,7 +104,7 @@
   if (SvOK(SVval) && SvROK(SVval)) {
     if (SvTYPE(SvRV(SVval))==SVt_PVCV) {
       SVval = call_coderef(SVval);
-    } else {
+    } else if(SvTYPE(SvRV(SVval))==SVt_PV) {
       SVval = SvRV(SVval);
     }
     SvGETMAGIC(SVval);

Modified: branches/upstream/libhtml-template-pro-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-template-pro-perl/current/README?rev=58313&op=diff
==============================================================================
--- branches/upstream/libhtml-template-pro-perl/current/README (original)
+++ branches/upstream/libhtml-template-pro-perl/current/README Sun May 23 14:50:59 2010
@@ -1,4 +1,4 @@
-HTML-Template-Pro version 0.94
+HTML-Template-Pro version 0.95
 ==============================
 
 DESCRIPTION

Modified: branches/upstream/libhtml-template-pro-perl/current/lib/HTML/Template/Pro.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-template-pro-perl/current/lib/HTML/Template/Pro.pm?rev=58313&op=diff
==============================================================================
--- branches/upstream/libhtml-template-pro-perl/current/lib/HTML/Template/Pro.pm (original)
+++ branches/upstream/libhtml-template-pro-perl/current/lib/HTML/Template/Pro.pm Sun May 23 14:50:59 2010
@@ -12,7 +12,7 @@
 use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
 @ISA = qw(DynaLoader Exporter);
 
-$VERSION = '0.94';
+$VERSION = '0.95';
 
 @EXPORT_OK = qw/ASK_NAME_DEFAULT ASK_NAME_AS_IS ASK_NAME_LOWERCASE ASK_NAME_UPPERCASE ASK_NAME_MASK/;
 %EXPORT_TAGS = (const => [qw/ASK_NAME_DEFAULT ASK_NAME_AS_IS ASK_NAME_LOWERCASE ASK_NAME_UPPERCASE ASK_NAME_MASK/]);

Modified: branches/upstream/libhtml-template-pro-perl/current/perl-HTML-Template-Pro.spec
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-template-pro-perl/current/perl-HTML-Template-Pro.spec?rev=58313&op=diff
==============================================================================
--- branches/upstream/libhtml-template-pro-perl/current/perl-HTML-Template-Pro.spec (original)
+++ branches/upstream/libhtml-template-pro-perl/current/perl-HTML-Template-Pro.spec Sun May 23 14:50:59 2010
@@ -6,7 +6,7 @@
 %define module HTML-Template-Pro
 
 Name: perl-%module
-Version: 0.94
+Version: 0.95
 Release: alt1
 
 Packager: Igor Yu. Vlasenko <viy at altlinux.org>
@@ -54,6 +54,9 @@
 %perl_vendor_man3dir/*
 
 %changelog
+* Fri May 21 2010 Igor Vlasenko <viy at altlinux.ru> 0.95-alt1
+- new version; see Changes
+
 * Tue Feb 16 2010 Igor Vlasenko <viy at altlinux.ru> 0.94-alt1
 - new version; see Changes
 

Added: branches/upstream/libhtml-template-pro-perl/current/t/06loop_var.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-template-pro-perl/current/t/06loop_var.t?rev=58313&op=file
==============================================================================
--- branches/upstream/libhtml-template-pro-perl/current/t/06loop_var.t (added)
+++ branches/upstream/libhtml-template-pro-perl/current/t/06loop_var.t Sun May 23 14:50:59 2010
@@ -1,0 +1,51 @@
+use Test::More no_plan;
+use HTML::Template::Pro;
+
+my $src_name =<<"END;";
+<TMPL_IF NAME="foo">
+name foo
+</TMPL_IF>
+END;
+
+my $src_expr_1 =<<"END;";
+<TMPL_IF EXPR="foo">
+[<TMPL_VAR EXPR="foo">]
+name foo
+</TMPL_IF>
+END;
+
+my $src_expr_2 =<<"END;";
+<TMPL_IF EXPR="foo or bar">
+name foo
+</TMPL_IF>
+END;
+my $template_name   = HTML::Template::Expr->new(scalarref => \$src_name);
+my $template_expr_1 = HTML::Template::Expr->new(scalarref => \$src_expr_1);
+my $template_expr_2 = HTML::Template::Expr->new(scalarref => \$src_expr_2);
+
+my $l = [ { x => 1} ];
+
+$template_expr_1->param(foo => 1);
+like($template_expr_1->output(), qr/name foo/i, "expr foo with scalar");
+$template_expr_1->param(foo => $l);
+like($template_expr_1->output(), qr/name foo/i, "expr foo with arrayref");
+
+$template_name->param(foo => 1);
+like($template_name->output(), qr/name foo/i, "name foo with scalar");
+$template_name->param(foo => [ { x => 1} ]);
+like($template_name->output(), qr/name foo/i, "name foo with arrayref");
+
+$template_expr_1->param(foo => 1);
+like($template_expr_1->output(), qr/name foo/i, "expr foo with scalar");
+$template_expr_1->param(foo => [ { x => 1} ]);
+like($template_expr_1->output(), qr/name foo/i, "expr foo with arrayref");
+
+$template_expr_2->param(foo => 1);
+like($template_expr_2->output(), qr/name foo/i, "expr foo_or_bar with scalar");
+$template_expr_2->param(foo => [ { x => 1} ]);
+like($template_expr_2->output(), qr/name foo/i, "expr foo_or_bar with arrayref");
+
+__END__
+
+
+




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