Bug 8063 - Followup - Bug fix
$OUTPUT being used but not being declared. When trying to run this script I gat a nasty: 15:42 ~/koha.dev/koha-community (new/bug_8063 $%)$ ./misc/cronjobs/gather_print_notices.pl Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 81. Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 95. Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 102. Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 106. Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 120. Global symbol "$OUTPUT" requires explicit package name at ./misc/cronjobs/gather_print_notices.pl line 127. Execution of ./misc/cronjobs/gather_print_notices.pl aborted due to compilation errors. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Before the patch: $perl -wc ./misc/cronjobs/gather_print_notices.pl Global symbol "$OUTPUT" requires explicit package name at [...]./misc/cronjobs/gather_print_notices.pl line 81. ./misc/cronjobs/gather_print_notices.pl had compilation errors. With this patch: $perl -wc ./misc/cronjobs/gather_print_notices.pl ./misc/cronjobs/gather_print_notices.pl syntax OK Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
0765d81640
commit
20b5228af6
1 changed files with 2 additions and 1 deletions
|
@ -69,6 +69,8 @@ my $today = C4::Dates->new();
|
|||
my @all_messages = @{ GetPrintMessages() };
|
||||
exit unless (@all_messages);
|
||||
|
||||
my $OUTPUT;
|
||||
|
||||
if ($split) {
|
||||
my %messages_by_branch;
|
||||
foreach my $message (@all_messages) {
|
||||
|
@ -77,7 +79,6 @@ if ($split) {
|
|||
|
||||
foreach my $branchcode ( keys %messages_by_branch ) {
|
||||
my @messages = @{ $messages_by_branch{$branchcode} };
|
||||
|
||||
open $OUTPUT, '>',
|
||||
File::Spec->catdir( $output_directory,
|
||||
"holdnotices-" . $today->output('iso') . "-$branchcode.html" );
|
||||
|
|
Loading…
Reference in a new issue