X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FTemplate.pm;h=f76796759dd35bada4f535c96b1764bba9ecc2d8;hb=8484285f05cdb419d89c4385d8889117bbd2df62;hp=7f4d27571bd827d31a9b9e093f59d8c2fd2451d7;hpb=90815a31b45ced8f49c31502cff1c8155e692a7a;p=kivitendo-erp.git diff --git a/SL/Template.pm b/SL/Template.pm index 7f4d27571..f76796759 100644 --- a/SL/Template.pm +++ b/SL/Template.pm @@ -838,9 +838,12 @@ sub parse { package OpenDocumentTemplate; +use Archive::Zip; use POSIX 'setsid'; use vars qw(@ISA); +use SL::Iconv; + use Cwd; # use File::Copy; # use File::Spec; @@ -856,19 +859,8 @@ sub new { my $self = $type->SUPER::new(@_); - foreach my $module (qw(Archive::Zip Text::Iconv)) { - eval("use ${module};"); - if ($@) { - $self->{"form"}->error("The Perl module '${module}' could not be " . - "loaded. Support for OpenDocument templates " . - "does not work without it. Please install your " . - "distribution's package or get the module from " . - "CPAN ( http://www.cpan.org )."); - } - } - $self->{"rnd"} = int(rand(1000000)); - $self->{"iconv"} = Text::Iconv->new($main::dbcharset, "UTF-8"); + $self->{"iconv"} = SL::Iconv->new($main::dbcharset, "UTF-8"); $self->set_tag_style('<%', '%>'); $self->{quot_re} = '"';