From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Aug 19 11:50:24 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8127216A4CE for ; Thu, 19 Aug 2004 11:50:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C95F43D58 for ; Thu, 19 Aug 2004 11:50:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i7JBoMg0091397 for ; Thu, 19 Aug 2004 11:50:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7JBoM4n091396; Thu, 19 Aug 2004 11:50:22 GMT (envelope-from gnats) Resent-Date: Thu, 19 Aug 2004 11:50:22 GMT Resent-Message-Id: <200408191150.i7JBoM4n091396@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alex Kapranoff Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F3B716A4CE for ; Thu, 19 Aug 2004 11:49:51 +0000 (GMT) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA07F43D4C for ; Thu, 19 Aug 2004 11:49:48 +0000 (GMT) (envelope-from kappa@capella.park.rambler.ru) Received: from capella.park.rambler.ru ([81.19.65.30]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id i7JBnlir013043 for ; Thu, 19 Aug 2004 15:49:47 +0400 (MSD) (envelope-from kappa@capella.park.rambler.ru) Received: by capella.park.rambler.ru (Postfix, from userid 1001) id 0F0D14224; Thu, 19 Aug 2004 15:49:50 +0400 (MSD) Message-Id: <20040819114950.0F0D14224@capella.park.rambler.ru> Date: Thu, 19 Aug 2004 15:49:50 +0400 (MSD) From: Alex Kapranoff To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/70656: Patches for www/p5-HTML-Template-JIT port X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2004 11:50:24 -0000 >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 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: