Revision 0b7d4ff9
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Template/LaTeX.pm | ||
---|---|---|
589 | 589 |
|
590 | 590 |
my $error; |
591 | 591 |
eval { |
592 |
my $template = SL::Template::LaTeX->new($template_file_name, $local_form, \%::myconfig, $::lx_office_conf{paths}->{userspath});
|
|
592 |
my $template = SL::Template::LaTeX->new(file_name => $template_file_name, form => $local_form);
|
|
593 | 593 |
my $result = $template->parse($tex_fh) && $template->convert_to_pdf; |
594 | 594 |
|
595 | 595 |
die $template->{error} unless $result; |
SL/Template/Simple.pm | ||
---|---|---|
32 | 32 |
sub _init { |
33 | 33 |
my ($self, %params) = @_; |
34 | 34 |
|
35 |
$params{myconfig} ||= \%::myconfig; |
|
36 |
$params{userspath} ||= $::lx_office_conf{paths}->{userspath}; |
|
37 |
|
|
35 | 38 |
$self->{$_} = $params{$_} for keys %params; |
36 | 39 |
|
37 | 40 |
$self->{variable_content_types} ||= {}; |
Auch abrufbar als: Unified diff
Refactoring: SL::Template: Parameterübergabe als Hash, nicht positionsabhängig (Teil 2)