From 7d993563e3e5f2dc4f6f98c837a6f172c7edd3e1 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 18 Feb 2014 09:46:59 +0100 Subject: [PATCH] CreatePDF-Helfer von Controller- in allgemeinen Helfer umgewandelt --- SL/{Controller => }/Helper/CreatePDF.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) rename SL/{Controller => }/Helper/CreatePDF.pm (93%) diff --git a/SL/Controller/Helper/CreatePDF.pm b/SL/Helper/CreatePDF.pm similarity index 93% rename from SL/Controller/Helper/CreatePDF.pm rename to SL/Helper/CreatePDF.pm index 90b5a6344..92349d4d6 100644 --- a/SL/Controller/Helper/CreatePDF.pm +++ b/SL/Helper/CreatePDF.pm @@ -1,4 +1,4 @@ -package SL::Controller::Helper::CreatePDF; +package SL::Helper::CreatePDF; use strict; @@ -15,10 +15,13 @@ use SL::Template; use SL::Template::LaTeX; use Exporter 'import'; -our @EXPORT = qw(create_pdf merge_pdfs); +our @EXPORT_OK = qw(create_pdf merge_pdfs); +our %EXPORT_TAGS = ( + all => \@EXPORT_OK, +); sub create_pdf { - my ($self, %params) = @_; + my ($class, %params) = @_; my $userspath = $::lx_office_conf{paths}->{userspath}; my $form = Form->new(''); @@ -73,7 +76,7 @@ sub create_pdf { } sub merge_pdfs { - my ($self, %params) = @_; + my ($class, %params) = @_; return scalar(File::Slurp::read_file($params{file_names}->[0])) if scalar(@{ $params{file_names} }) < 2; -- 2.20.1