Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Aug 2004 15:49:50 +0400 (MSD)
From:      Alex Kapranoff <kappa@rambler-co.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/70656: Patches for www/p5-HTML-Template-JIT port
Message-ID:  <20040819114950.0F0D14224@capella.park.rambler.ru>
Resent-Message-ID: <200408191150.i7JBoM4n091396@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         70656
>Category:       ports
>Synopsis:       Patches for www/p5-HTML-Template-JIT port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 19 11:50:22 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Alex Kapranoff
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Inner Mongolia
>Environment:
FreeBSD capella.park.rambler.ru 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue Jun 15 17:17:42 MSD 2004     root@capella.rambler.stack.net:/usr/obj/usr/src/sys/CAPELLA  i386

	
>Description:

These are patches I originally sumbitted to Sam via mailing list. They
will probably make into next release, but as it won't happen
real soon, let's them sit in our ports tree now. This will do no harm and
make someone's life easier (mine included).

Description:
+ Fix 8bit symbols escaping.
+ Allow blessed hashrefs in loops.
+ Fix a portlint warning and make it not clutter perllocal.pod

>How-To-Repeat:
	
>Fix:

	

diff -ruN /usr/ports/www/p5-HTML-Template-JIT/Makefile p5-HTML-Template-JIT/Makefile
--- /usr/ports/www/p5-HTML-Template-JIT/Makefile	Sat May  8 07:43:13 2004
+++ p5-HTML-Template-JIT/Makefile	Thu Aug 12 15:22:09 2004
@@ -7,7 +7,7 @@
 
 PORTNAME=	HTML-Template-JIT
 PORTVERSION=	0.04
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	www perl5
 MASTER_SITES=	${MASTER_SITE_PERL_CPAN}
 MASTER_SITE_SUBDIR=	HTML
@@ -22,6 +22,7 @@
 RUN_DEPENDS=	${BUILD_DEPENDS}
 
 PERL_CONFIGURE=	yes
+INSTALL_TARGET=	pure_install
 
 MAN3=		HTML::Template::JIT.3 HTML::Template::JIT::Compiler.3 \
 		HTML::Template::JIT::Base.3
@@ -32,12 +33,13 @@
 	@${PERL} -i -pe 's/indent -kr/indent/' \
 			${WRKSRC}/JIT/Compiler.pm
 .if ${PERL_LEVEL} < 500600
-	@${PERL} -i -pe '$$_ = "" if /warnings|5\.006/g;' \
+	@${PERL} -i -pe '$$_ = "" if m/warnings|5\.006/g;' \
 			-e 's/\bour ([^ ;]+)/use vars qw{$$1};$$1/g;' \
 			${WRKSRC}/Makefile.PL ${WRKSRC}/JIT.pm \
 			${WRKSRC}/JIT/Base.pm ${WRKSRC}/JIT/Compiler.pm
 
 EXTRA_PATCHES=	${PATCHDIR}/5.005-JIT-Compiler.pm
 .endif
+	@${RM} ${WRKSRC}/JIT/*.orig
 
 .include <bsd.port.post.mk>
diff -ruN /usr/ports/www/p5-HTML-Template-JIT/files/patch-Compiler.pm p5-HTML-Template-JIT/files/patch-Compiler.pm
--- /usr/ports/www/p5-HTML-Template-JIT/files/patch-Compiler.pm	Thu Jan  1 03:00:00 1970
+++ p5-HTML-Template-JIT/files/patch-Compiler.pm	Tue May 18 18:34:38 2004
@@ -0,0 +1,11 @@
+--- Compiler.pm.orig	Tue May 18 18:32:59 2004
++++ JIT/Compiler.pm	Tue May 18 18:33:52 2004
+@@ -131,7 +131,7 @@
+   SV * temp_sv;
+   int i;
+   STRLEN len;
+-  char c;
++  unsigned char c;
+   char buf[4];
+ 
+   SvPOK_on(result);
diff -ruN /usr/ports/www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm p5-HTML-Template-JIT/files/patch-JIT::Base.pm
--- /usr/ports/www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm	Thu Jan  1 03:00:00 1970
+++ p5-HTML-Template-JIT/files/patch-JIT::Base.pm	Wed Jun  9 16:16:01 2004
@@ -0,0 +1,11 @@
+--- JIT/Base.pm	Wed Jun  9 15:31:15 2004
++++ JIT/Base.pm	Wed Jun  9 15:34:32 2004
+@@ -75,7 +75,7 @@
+ 
+   foreach my $row (@$array) {
+     croak("Bad param settings - found non hash-ref for loop row in loop $loop_name!")
+-      unless ref $row eq 'HASH';
++      unless ref $row && UNIVERSAL::isa($row, 'HASH');
+     
+     my $lc_name;
+     foreach my $name (keys %$row) {
diff -ruN /usr/ports/www/p5-HTML-Template-JIT/files/patch-t::03loops.t p5-HTML-Template-JIT/files/patch-t::03loops.t
--- /usr/ports/www/p5-HTML-Template-JIT/files/patch-t::03loops.t	Thu Jan  1 03:00:00 1970
+++ p5-HTML-Template-JIT/files/patch-t::03loops.t	Wed Jun  9 16:01:23 2004
@@ -0,0 +1,22 @@
+--- t/03loops.t	Wed Jun  9 15:57:13 2004
++++ t/03loops.t	Wed Jun  9 16:00:15 2004
+@@ -1,4 +1,4 @@
+-use Test::More tests => 8;
++use Test::More tests => 9;
+ use HTML::Template::JIT;
+ 
+ my $debug = 0;
+@@ -69,3 +69,13 @@
+ like($output, qr/Apples, Oranges, Brains, Toes, and Kiwi./);
+ like($output, qr/pingpongpingpongpingpong/);
+ 
++$template = HTML::Template::JIT->new(filename => 'loop.tmpl',
++				     path => ['t/templates'],
++				     jit_path => 't/jit_path',
++				     jit_debug => $debug,
++				    );
++$template->param(foo => "FOO");
++$template->param(bar => [ bless({ val => 'foo' }, 'barfoo'),
++    bless({ val => 'bar' }, 'barbar') ]);
++$output = $template->output();
++like($output, qr/bar: foo,bar,/);
diff -ruN /usr/ports/www/p5-HTML-Template-JIT/files/patch-t::10escape.t p5-HTML-Template-JIT/files/patch-t::10escape.t
--- /usr/ports/www/p5-HTML-Template-JIT/files/patch-t::10escape.t	Thu Jan  1 03:00:00 1970
+++ p5-HTML-Template-JIT/files/patch-t::10escape.t	Wed Jun  9 15:30:11 2004
@@ -0,0 +1,22 @@
+--- t/10escape.t	Tue May 18 18:39:12 2004
++++ t/10escape.t	Tue May 18 18:42:03 2004
+@@ -1,4 +1,4 @@
+-use Test::More tests => 3;
++use Test::More tests => 4;
+ use HTML::Template::JIT;
+ my $debug = 0;
+ 
+@@ -35,3 +35,13 @@
+ $output = $template->output;
+ like($output, qr/Some URL escaped stuff:/); 
+ 
++# test 8bit char in urlescaped var
++$template = HTML::Template::JIT->new(
++                                     filename => 'urlescape.tmpl',
++                                     path => ['t/templates'],
++                                     jit_path => 't/jit_path',
++                                     jit_debug => $debug,
++                                    );
++$template->param(STUFF => "\xf4"); #"
++$output = $template->output;
++like($output, qr/%F4/); #"

-- 
Alex Kapranoff.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040819114950.0F0D14224>