diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2004-08-19 16:20:11 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2004-08-19 16:20:11 +0000 |
commit | 0dcbb3207ce6a44cfa30fb333e3d6067bf9223ce (patch) | |
tree | 9648b1b78eeba2a08498e52dd9a154a5465d8d2a /www/p5-HTML-Template-JIT/files | |
parent | Add myself, my mentor :p (diff) |
Add some patches :
+ Fix 8bit symbols escaping.
+ Allow blessed hashrefs in loops.
+ Fix a portlint warning and make it not clutter perllocal.pod
PR: 70656
Submitted by: Alex Kapranoff <kappa@rambler-co.ru>
Notes
Notes:
svn path=/head/; revision=116698
Diffstat (limited to 'www/p5-HTML-Template-JIT/files')
-rw-r--r-- | www/p5-HTML-Template-JIT/files/patch-Compiler.pm | 11 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm | 11 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/files/patch-t::03loops.t | 22 | ||||
-rw-r--r-- | www/p5-HTML-Template-JIT/files/patch-t::10escape.t | 22 |
4 files changed, 66 insertions, 0 deletions
diff --git a/www/p5-HTML-Template-JIT/files/patch-Compiler.pm b/www/p5-HTML-Template-JIT/files/patch-Compiler.pm new file mode 100644 index 000000000000..70315eb7a2dd --- /dev/null +++ b/www/p5-HTML-Template-JIT/files/patch-Compiler.pm @@ -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 --git a/www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm b/www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm new file mode 100644 index 000000000000..22b99d125050 --- /dev/null +++ b/www/p5-HTML-Template-JIT/files/patch-JIT::Base.pm @@ -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 --git a/www/p5-HTML-Template-JIT/files/patch-t::03loops.t b/www/p5-HTML-Template-JIT/files/patch-t::03loops.t new file mode 100644 index 000000000000..83ebcd4f2ea1 --- /dev/null +++ b/www/p5-HTML-Template-JIT/files/patch-t::03loops.t @@ -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 --git a/www/p5-HTML-Template-JIT/files/patch-t::10escape.t b/www/p5-HTML-Template-JIT/files/patch-t::10escape.t new file mode 100644 index 000000000000..a2f5f54eab5f --- /dev/null +++ b/www/p5-HTML-Template-JIT/files/patch-t::10escape.t @@ -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/); #" |