Schrift
[thread]4557[/thread]

HTML::Template::Compiled (HTC) (Seite 15)

Leser: 31


<< |< 1 ... 12 13 14 15 16 17 18 ... 21 >| >> 210 Einträge, 21 Seiten
MartinR
 2006-08-21 13:57
#40924 #40924
User since
2004-06-17
305 Artikel
BenutzerIn
[default_avatar]
[quote=renee,21.08.2006, 10:18]Dafür gibt's ja loop_context_vars siehe Doku zu CPAN:HTML::Template::Compiled unter Options.[/quote]
... wenn ich folgendes schreibe

Quote
HTML::Template::Compiled->new (
filename => $self->param('TMPL_RAHMEN'),
path => '/xxx/tmpl/',
case_sensitive => 1,
loop_context_vars => 0,
);


geht es auch noch. Da ich ja aber die Contextvariablen gerne nutzen möchte setze ich also loop_context_vars auf '1'. Und dann geschieht folgendes:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
[Mon Aug 21 11:45:59 2006] test.pl: Use of uninitialized value in string at /xxx/HTML/Template/Compiled/Expression/Expressions.pm line 54.
[Mon Aug 21 11:45:59 2006] test.pl: Error executing class callback in init stage: code: syntax error at (eval 83) line 44, near "(  ) "
[Mon Aug 21 11:45:59 2006] test.pl: syntax error at (eval 83) line 72, near "} # end loop
[Mon Aug 21 11:45:59 2006] test.pl:     $OUT "
[Mon Aug 21 11:45:59 2006] test.pl: Global symbol "$OUT" requires explicit package name at (eval 83) line 72.
[Mon Aug 21 11:45:59 2006] test.pl: Global symbol "$OUT" requires explicit package name at (eval 83) line 76.
[Mon Aug 21 11:45:59 2006] test.pl: Global symbol "$OUT" requires explicit package name at (eval 83) line 79.
[Mon Aug 21 11:45:59 2006] test.pl: syntax error at (eval 83) line 81, near ";
[Mon Aug 21 11:45:59 2006] test.pl:
[Mon Aug 21 11:45:59 2006] test.pl: }"
pq
 2006-08-21 14:40
#40925 #40925
User since
2003-08-04
12209 Artikel
Admin1
[Homepage]
user image
hmm, komischer fehler. aber ich kann ich nicht nachvollziehen.
aber ich kenne ja auch nicht dein template. könntest du das
mal bitte posten?

edit: doch, ich bekomme auch einen fehler mit dem template, das du
oben gepostet hattest. hab einfach mal geraten, dass es das ist.
aber mein fehler sind anders aus, da kommt nichts mit callback oder so.

edit: aha, der code funktioniert nur mit kleingeschriebenen variablen
wie __first__ etc.
hier das diff, falls du es reparieren willst:
Code: (dl )
1
2
3
4
5
diff -r1.4 Compiler.pm
84c84
<         my $lc = $loop_context{ $args{var} };
---
>         my $lc = $loop_context{ lc $args{var} };


ich schreib immer alles klein, deshalb vergesse ich oft, auch auf
großschreibung zu testen.\n\n

<!--EDIT|pq|1156157369-->
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem
MartinR
 2006-08-21 18:25
#40926 #40926
User since
2004-06-17
305 Artikel
BenutzerIn
[default_avatar]
[quote=pq,21.08.2006, 12:40]
Code: (dl )
1
2
3
4
5
diff -r1.4 Compiler.pm
84c84
<         my $lc = $loop_context{ $args{var} };
---
>         my $lc = $loop_context{ lc $args{var} };
[/quote]
Danke schöööön. Ich werde Dich in mein Nachtgebet einschließen. Nun funzt es!
pq
 2006-08-26 18:10
#40927 #40927
User since
2003-08-04
12209 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
0.73 Sat Aug 26 16:07:57 CEST 2006
- Bugfix: in 0.72 only __first__ worked, but not __FIRST__
- Change: query() now also reports INCLUDE_VARs
- New feature: __index__ loop variable
- New feature: Plugins for escape-attribute
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem
pq
 2006-08-26 21:52
#40928 #40928
User since
2003-08-04
12209 Artikel
Admin1
[Homepage]
user image
@ronnie:
http://search.cpan.org/dist/HTML-Template-Compiled-Plugin-InlineImage/
http://search.cpan.org/src....gd.html

Code: (dl )
1
2
3
4
0.02 Sun Aug 27 12:45:08 CEST 2006
- Change: $SIZE_WARNING
- Change: changed output to src="..." width="..." height="..."
- Documentation


edit: das bezog sich auf eine irc-unterhaltung. ronnie hatte die
idee mit den inline-images. kann sehr praktisch sein für
dynamische reports.\n\n

<!--EDIT|pq|1156887435-->
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem
pq
 2006-09-14 00:02
#40929 #40929
User since
2003-08-04
12209 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
0.74 Wed Sep 13 20:51:04 CEST 2006
- Internal Changes
- Security fix: Escape dangerous characters in template
- default for search_path_on_include is now 0 like in H::T
- added examples/objects.pl
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem
pq
 2006-09-15 01:06
#40930 #40930
User since
2003-08-04
12209 Artikel
Admin1
[Homepage]
user image
und der zweite streich folgt sogleich:
Code: (dl )
1
2
0.75 Thu Sep 14 22:42:19 CEST 2006
- Bugfix of bug in 0.74: search_path_on_include didn't work
\n\n

<!--EDIT|pq|1158267980-->
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem
pq
 2006-10-05 12:12
#40931 #40931
User since
2003-08-04
12209 Artikel
Admin1
[Homepage]
user image
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
0.78 Wed Oct  4 21:22:09 CEST 2006
- Bugfix: endless loop when using file cache
- Bugfix: correctly use cache attribute with filecache

0.77 Mon Oct  2 18:35:52 CEST 2006
- fixed META.yaml (was broken by E::MakeMaker)

0.76 Mon Oct  2 18:15:29 CEST 2006
- Change: HTC::Classic: TMPL_IF arrayref will be true if arrayref contains elements
- Change: __odd__, __first__, __count__ and __index__ work in TMPL_WHILE
- Bugfix: path attribute
- Change: deprecate option dumper (use plugin instead)
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem
esskar
 2006-10-11 10:48
#40932 #40932
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
Tipp: anstatt den Md5 zu berechnen - für den memory cache - könntest du mal einen CRC (z.B. 32) testen. Könnte schneller sein. Hat ja nichts mit Security, also kannst du auf den kryptographischen Zucker verzichten!
Froschpopo
 2006-10-11 21:10
#40933 #40933
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
Ich hab auch noch ne Idee am Start.
Ich fänds cool, wenn man auch die allg. Parameter innerhalb eines Loops verwenden könnte. Schließlich kann ich dir auch auf INCLUDE-Dateien anwenden.
So aber muss ich eigene Parameter in den Loop einschleusen, anstatt dass dieser sich auch an den "globalen" bedient. Klar, es dürfte dann keine Mehrfachvorkommen existieren, aber das könnte man doch mit einem Switch regeln.
<< |< 1 ... 12 13 14 15 16 17 18 ... 21 >| >> 210 Einträge, 21 Seiten



View all threads created 2005-06-26 15:48.