[Koha-bugs] [Bug 21853] Internal software error when exporting basket group as PDF with Perl > 5.24.1
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Sun Nov 18 05:47:30 CET 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21853
--- Comment #3 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 82422
--> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82422
Bug 21853: Fix PDF export of basketgroups
Review of attachment 82422:
--> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=21853&attachment=82422)
-----------------------------------------------------------------
::: acqui/pdfformat/layout2pages.pm
@@ +1,1 @@
> +package Koha::pdfformat::layout2pages;
I don't think you needed to remove the #!/usr/bin/perl, but merely add the
Koha:: to the line below. -- Tested my idea, and yes this is overkill.
::: acqui/basketgroup.pl
@@ +130,5 @@
> + if (grep {$_ eq $pdfformat} @valid_pdfformats) {
> + $pdfformat = "Koha::$pdfformat";
> + my $pdfformat_filepath = File::Spec->catfile(split /::/, $pdfformat) . '.pm';
> + require $pdfformat_filepath;
> + import $pdfformat;
Love this minor refactor. Much clearer and simpler.
@@ +137,5 @@
> + print $input->header;
> + print $input->start_html; # FIXME Should do a nicer page
> + print "<h1>Invalid PDF Format set</h1>";
> + print "Please go to the systempreferences and set a valid pdfformat";
> + exit;
Over zealous white space fixing. :)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list