[system] / trunk / webwork-modperl / lib / WeBWorK / Template.pm Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/lib/WeBWorK/Template.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1870 Revision 1871
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/HTML/ScrollingRecordList.pm,v 1.2 2004/03/04 21:05:04 sh002i Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/Template.pm,v 1.1 2004/03/10 02:31:05 sh002i Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
98 98
99=cut 99=cut
100 100
101use strict; 101use strict;
102use warnings; 102use warnings;
103use WeBWorK::Utils qw(readFile);
103 104
104our @EXPORT = (); 105our @EXPORT = ();
105our @EXPORT_OK = qw( 106our @EXPORT_OK = qw(
106 template 107 template
107); 108);
146 $ifstack[-1] = not $ifstack[-1]; 147 $ifstack[-1] = not $ifstack[-1];
147 } elsif ($function eq "endif" and @ifstack > 1) { 148 } elsif ($function eq "endif" and @ifstack > 1) {
148 pop @ifstack; 149 pop @ifstack;
149 } elsif ($ifstack[-1]) { 150 } elsif ($ifstack[-1]) {
150 if ($cg->can($function)) { 151 if ($cg->can($function)) {
151 my @result = $cg->$function(@_, {@args}); 152 my @result = $cg->$function({@args});
152 if (@result) { 153 if (@result) {
153 print @result; 154 print @result;
154 } else { 155 } else {
155 warn "Template escape $function returned an empty list."; 156 warn "Template escape $function returned an empty list.";
156 } 157 }

Legend:
Removed from v.1870  
changed lines
  Added in v.1871

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9