From ea707efcb3b6f5cda6ccf12fb86c4659b9db079f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 23 Dec 2008 14:46:48 +0000 Subject: [PATCH] Reportgenerator strict --- SL/ReportGenerator.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SL/ReportGenerator.pm b/SL/ReportGenerator.pm index 050984aa3..f390db058 100644 --- a/SL/ReportGenerator.pm +++ b/SL/ReportGenerator.pm @@ -1,12 +1,14 @@ package SL::ReportGenerator; +use strict; + use Encode; use IO::Wrap; use List::Util qw(max); use Text::CSV_XS; use Text::Iconv; -use PDF::API2; -use PDF::Table; +#use PDF::API2; # these two eat up to .75s on startup. only load them if we actually need them +#use PDF::Table; use SL::Form; @@ -440,7 +442,7 @@ sub generate_pdf_content { my $font_encoding = $main::dbcharset || 'ISO-8859-15'; $self->{text_is_utf8} = $font_encoding =~ m/^utf-?8$/i; - foreach $name (@visible_columns) { + foreach my $name (@visible_columns) { push @column_props, { 'justify' => $self->{columns}->{$name}->{align} eq 'right' ? 'right' : 'left' }; } @@ -450,8 +452,8 @@ sub generate_pdf_content { push @data, $data_row; push @cell_props, $cell_props_row; - foreach $name (@visible_columns) { - $column = $self->{columns}->{$name}; + foreach my $name (@visible_columns) { + my $column = $self->{columns}->{$name}; push @{ $data_row }, $self->_decode_text($column->{text}); push @{ $cell_props_row }, {}; -- 2.20.1