r28459 - in /trunk/libhtml-template-pro-perl: Changes META.yml Pro.xs debian/changelog lib/HTML/Template/PerlInterface.pod lib/HTML/Template/Pro.pm perl-HTML-Template-Pro.spec procore.c procore.h pstring.h
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sun Dec 21 22:11:52 UTC 2008
Author: gregoa
Date: Sun Dec 21 22:11:49 2008
New Revision: 28459
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=28459
Log:
New upstream release.
Modified:
trunk/libhtml-template-pro-perl/Changes
trunk/libhtml-template-pro-perl/META.yml
trunk/libhtml-template-pro-perl/Pro.xs
trunk/libhtml-template-pro-perl/debian/changelog
trunk/libhtml-template-pro-perl/lib/HTML/Template/PerlInterface.pod
trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro.pm
trunk/libhtml-template-pro-perl/perl-HTML-Template-Pro.spec
trunk/libhtml-template-pro-perl/procore.c
trunk/libhtml-template-pro-perl/procore.h
trunk/libhtml-template-pro-perl/pstring.h
Modified: trunk/libhtml-template-pro-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/Changes?rev=28459&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/Changes (original)
+++ trunk/libhtml-template-pro-perl/Changes Sun Dec 21 22:11:49 2008
@@ -153,3 +153,9 @@
0.71 Sat Aug 16 15:05:01 EEST 2008
- fixed evaluation of variables in 'if' even in shadow context
- fixed misconfig on Darvin (CPAN #38013)
+
+0.72 Thu Dec 18 21:22:45 EET 2008
+ - added support of path through variable scope
+ (by Shigeki Morimoto <shigeki.morimoto at mixi.co.jp>)
+
+
Modified: trunk/libhtml-template-pro-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/META.yml?rev=28459&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/META.yml (original)
+++ trunk/libhtml-template-pro-perl/META.yml Sun Dec 21 22:11:49 2008
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: HTML-Template-Pro
-version: 0.71
+version: 0.72
abstract: Perl/XS module to use HTML Templates from CGI scripts
license: ~
generated_by: ExtUtils::MakeMaker version 6.32
Modified: trunk/libhtml-template-pro-perl/Pro.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/Pro.xs?rev=28459&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/Pro.xs (original)
+++ trunk/libhtml-template-pro-perl/Pro.xs Sun Dec 21 22:11:49 2008
@@ -396,6 +396,7 @@
param->debug=get_integer_from_hash(SelfHash,"debug");
param->loop_context_vars=get_integer_from_hash(SelfHash,"loop_context_vars");
param->case_sensitive=get_integer_from_hash(SelfHash,"case_sensitive");
+ param->path_like_variable_scope=get_integer_from_hash(SelfHash,"path_like_variable_scope");
/* still unsupported */
param->strict=get_integer_from_hash(SelfHash,"strict");
param->die_on_bad_params=get_integer_from_hash(SelfHash,"die_on_bad_params");
Modified: trunk/libhtml-template-pro-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/debian/changelog?rev=28459&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/debian/changelog (original)
+++ trunk/libhtml-template-pro-perl/debian/changelog Sun Dec 21 22:11:49 2008
@@ -1,5 +1,6 @@
-libhtml-template-pro-perl (0.71-2) UNRELEASED; urgency=low
+libhtml-template-pro-perl (0.72-1) UNRELEASED; urgency=low
+ * New upstream release.
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
(source stanza).
Modified: trunk/libhtml-template-pro-perl/lib/HTML/Template/PerlInterface.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/lib/HTML/Template/PerlInterface.pod?rev=28459&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/lib/HTML/Template/PerlInterface.pod (original)
+++ trunk/libhtml-template-pro-perl/lib/HTML/Template/PerlInterface.pod Sun Dec 21 22:11:49 2008
@@ -442,6 +442,25 @@
B<NOTE>: C<global_vars> is not C<global_loops> (which does not exist).
That means that loops you declare at one scope are not available
inside other loops even when C<global_vars> is on.
+
+=item *
+
+path_like_variable_scope - this option switches on a Shigeki Morimoto
+extension to HTML::Template::Pro that allows access to variables that
+are outside the current loop scope using path-like expressions.
+
+Example:
+{{{
+<TMPL_LOOP NAME=class>
+ <TMPL_LOOP NAME=person>
+ <TMPL_VAR NAME="../teacher_name"> <!-- access to class.teacher_name -->
+ <TMPL_VAR NAME="name">
+ <TMPL_VAR NAME="age">
+ <TMPL_VAR NAME="age">
+ <TMPL_VAR NAME="/top_level_value"> <!-- access to top level value -->
+ </TMPL_LOOP>
+</TMPL_LOOP>
+}}}
=item *
Modified: trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro.pm?rev=28459&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro.pm (original)
+++ trunk/libhtml-template-pro-perl/lib/HTML/Template/Pro.pm Sun Dec 21 22:11:49 2008
@@ -9,7 +9,7 @@
use vars qw($VERSION @ISA);
@ISA = qw(DynaLoader);
-$VERSION = '0.71';
+$VERSION = '0.72';
bootstrap HTML::Template::Pro $VERSION;
Modified: trunk/libhtml-template-pro-perl/perl-HTML-Template-Pro.spec
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/perl-HTML-Template-Pro.spec?rev=28459&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/perl-HTML-Template-Pro.spec (original)
+++ trunk/libhtml-template-pro-perl/perl-HTML-Template-Pro.spec Sun Dec 21 22:11:49 2008
@@ -6,7 +6,7 @@
%define module HTML-Template-Pro
Name: perl-%module
-Version: 0.71
+Version: 0.72
Release: alt1
Packager: Igor Yu. Vlasenko <viy at altlinux.org>
@@ -54,6 +54,9 @@
%perl_vendor_man3dir/*
%changelog
+* Thu Dec 18 2008 Igor Vlasenko <viy at altlinux.ru> 0.72-alt1
+- new version; see Changes
+
* Sat Aug 16 2008 Igor Vlasenko <viy at altlinux.ru> 0.71-alt1
- new version; see Changes
Modified: trunk/libhtml-template-pro-perl/procore.c
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/procore.c?rev=28459&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/procore.c (original)
+++ trunk/libhtml-template-pro-perl/procore.c Sun Dec 21 22:11:49 2008
@@ -278,8 +278,34 @@
static
ABSTRACT_VALUE* walk_through_nested_loops (struct tmplpro_state *state, PSTRING name) {
int PrevHash;
- struct ProLoopState* currentScope = getCurrentScope(&state->param->var_scope_stack);
- ABSTRACT_VALUE* valptr= state->param->getAbstractValFuncPtr(currentScope->param_HV, name);
+ struct ProLoopState* currentScope;
+ ABSTRACT_VALUE* valptr;
+ /* Shigeki Morimoto path_like_variable_scope extension */
+ if (state->param->path_like_variable_scope) {
+ if(*(name.begin) == '/' || strncmp(name.begin, "../", 3) == 0){
+ PSTRING tmp_name;
+ int GoalHash;
+ if(*(name.begin) == '/'){
+ tmp_name.begin = name.begin+1; // skip '/'
+ tmp_name.endnext = name.endnext;
+ GoalHash = 0;
+ }else{
+ tmp_name.begin = name.begin;
+ tmp_name.endnext = name.endnext;
+ GoalHash = curScopeLevel(&state->param->var_scope_stack);
+ while(strncmp(tmp_name.begin, "../", 3) == 0){
+ tmp_name.begin = tmp_name.begin + 3; // skip '../'
+ GoalHash --;
+ }
+ }
+ valptr = state->param->getAbstractValFuncPtr(getScope(&state->param->var_scope_stack, GoalHash)->param_HV, tmp_name);
+ return valptr;
+ }
+ }
+ /* end Shigeki Morimoto path_like_variable_scope extension */
+
+ currentScope = getCurrentScope(&state->param->var_scope_stack);
+ valptr= state->param->getAbstractValFuncPtr(currentScope->param_HV, name);
if ((0==state->param->global_vars) || (valptr)) return valptr;
PrevHash=curScopeLevel(&state->param->var_scope_stack)-1;
while (PrevHash>=0) {
Modified: trunk/libhtml-template-pro-perl/procore.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/procore.h?rev=28459&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/procore.h (original)
+++ trunk/libhtml-template-pro-perl/procore.h Sun Dec 21 22:11:49 2008
@@ -91,10 +91,10 @@
const char* filename; /* template file */
PSTRING scalarref; /* memory area */
/* currently used in Perl code */
- /* int search_path_on_include; */
+ /* flag search_path_on_include; */
/* still unsupported */
flag die_on_bad_params;
- /* int vanguard_compatibility_mode; */
+ /* flag vanguard_compatibility_mode; */
/* hooks to perl or other container */
/* HTML::Template hooks */
writerfunc WriterFuncPtr;
@@ -119,6 +119,7 @@
is_expr_userfnc_func IsExprUserfncFuncPtr;
void* ExprFuncHash;
void* ExprFuncArglist;
+ flag path_like_variable_scope;
/* private */
int cur_includes; /* internal counter of include depth */
const char* selfpath; /* file that has included this file, or empty string */
Modified: trunk/libhtml-template-pro-perl/pstring.h
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-template-pro-perl/pstring.h?rev=28459&op=diff
==============================================================================
--- trunk/libhtml-template-pro-perl/pstring.h (original)
+++ trunk/libhtml-template-pro-perl/pstring.h Sun Dec 21 22:11:49 2008
@@ -9,7 +9,7 @@
#ifndef _PSTRING_H
#define _PSTRING_H 1
-#include<pbuffer.h>
+#include "pbuffer.h"
typedef struct PSTRING {
char* begin;
More information about the Pkg-perl-cvs-commits
mailing list