From: Sven Schöling Date: Tue, 23 Dec 2008 14:46:48 +0000 (+0000) Subject: Reportgenerator strict X-Git-Tag: release-2.6.0beta2~207 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ea707efcb3b6f5cda6ccf12fb86c4659b9db079f;p=kivitendo-erp.git Reportgenerator strict --- 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 }, {};