% $workbook->close();# or die "Error creating .xls file: $!";
%
% http_header('Content-Length' => length($output) );
-%
-<% $output %>
+% $m->print($output);
+%
% } elsif ( $cgi->param('_type') eq 'png' ) {
% # delete any items that shouldn't be on the graph
% if ( my $no_graph = $opt{'no_graph'} ) {
$r++;
} #$row
$workbook->close;
+
+ http_header('Content-Length' => length($output));
+ $m->print($output);
</%perl>
-<% $output %>
-% } else {
+% } else {
<& /elements/header.html, $title &>
% my $myself = $cgi->self_url;
<P ALIGN="right" CLASS="noprint">
-<% $data %>
<%init>
my %args = @_;
$workbook->close();# or die "Error creating .xls file: $!";
http_header('Content-Length' => length($data) );
+$m->print($data);
</%init>
%
% } elsif ( $type =~ /\.xls$/ ) {
%
-<% include('search-xls.html', header=>$header, rows=>$rows, opt=>\%opt ) %>
+<& 'search-xls.html', header=>$header, rows=>$rows, opt=>\%opt &>\
+% # prevent the caller from polluting our output stream
+% $m->abort;
%
% } elsif ( $type eq 'xml' ) {
%
-<% $data %>
<%init>
my $htmldoc = include('report_tax.cgi');
$workbook->close;
+http_header('Content-Length' => length($data));
+$m->print($data);
</%init>