Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update incorrect exit() calls in reports and labels

Unix' convention is that a 0 exit status indicates success and
non-zero failure, the inverse of Perl/C/etc.
  • Loading branch information...
commit 3122a09fd620cde053b007e737bee2ffecb8994e 1 parent 50bfa2c
@ctfliblime ctfliblime authored
View
2  labels/label-create-csv.pl
@@ -75,7 +75,7 @@
}
}
-exit(1);
+exit;
=head1 NAME
View
2  labels/label-create-pdf.pl
@@ -170,7 +170,7 @@ sub _calc_next_label_pos {
$pdf->End();
-exit(1);
+exit;
sub _print_text {
my $label_text = shift;
View
2  labels/label-create-xml.pl
@@ -83,7 +83,7 @@
#die "XML OUT:\n" . Dumper($xml_out);
print $xml_out;
-exit(1);
+exit;
=head1 NAME
View
2  reports/acquisitions_stats.pl
@@ -111,7 +111,7 @@ =head1 DESCRIPTION
}
print $sep. @$results[0]->{total};
}
- exit(1);
+ exit;
}
else {
my $dbh = C4::Context->dbh;
View
2  reports/bor_issues_top.pl
@@ -103,7 +103,7 @@ =head1 DESCRIPTION
print join($sep, map {$_->{totalcol}} @$cols);
print $sep.@$results[0]->{total};
}
- exit(1);
+ exit;
}
my $dbh = C4::Context->dbh;
View
4 reports/borrowers_out.pl
@@ -70,7 +70,7 @@ =head1 DESCRIPTION
# Printing results to screen
$template->param(mainloop => $results);
output_html_with_http_headers $input, $cookie, $template->output;
- exit(1);
+ exit;
} else {
# Printing to a csv file
print $input->header(-type => 'application/vnd.sun.xml.calc',
@@ -104,7 +104,7 @@ =head1 DESCRIPTION
print $sep.$col->{totalcol};
}
print $sep.@$results[0]->{total};
- exit(1);
+ exit;
}
# Displaying choices
} else {
View
2  reports/borrowers_stats.pl
@@ -105,7 +105,7 @@ =head1 DESCRIPTION
}
print $sep.@$results[0]->{total};
}
- exit(1); # exit after do_it, regardless
+ exit; # exit after do_it, regardless
} else {
my $dbh = C4::Context->dbh;
my $req;
View
2  reports/cancelledholds.pl
@@ -88,7 +88,7 @@ =head1 DESCRIPTION
# Printing results to screen
$template->param(results => \@rows);
output_html_with_http_headers $input, $cookie, $template->output;
- exit(1);
+ exit;
}
else {
# Printing to a csv file
View
4 reports/cat_issues_top.pl
@@ -74,7 +74,7 @@ =head1 DESCRIPTION
$template->param(mainloop => $results,
limit => $limit);
output_html_with_http_headers $input, $cookie, $template->output;
- exit(1);
+ exit;
} else {
# Printing to a csv file
print $input->header(-type => 'application/vnd.sun.xml.calc',
@@ -107,7 +107,7 @@ =head1 DESCRIPTION
print $sep.$col->{totalcol};
}
print $sep.@$results[0]->{total};
- exit(1);
+ exit;
}
# Displaying choices
} else {
View
2  reports/catalogue_out.pl
@@ -98,7 +98,7 @@ =head1 catalogue_out
}
print $sep.@$results[0]->{total};
}
- exit(1); # in either case, exit after do_it
+ exit; # in either case, exit after do_it
}
# Displaying choices (i.e., not do_it)
View
4 reports/catalogue_stats.pl
@@ -76,7 +76,7 @@ =head1 DESCRIPTION
if ($output eq "screen"){
$template->param(mainloop => $results);
output_html_with_http_headers $input, $cookie, $template->output;
- exit(1);
+ exit;
} else {
print $input->header(-type => 'application/vnd.sun.xml.calc',
-encoding => 'utf-8',
@@ -104,7 +104,7 @@ =head1 DESCRIPTION
print $sep.$col->{totalcol};
}
print $sep.@$results[0]->{total};
- exit(1);
+ exit;
}
} else {
my $dbh = C4::Context->dbh;
View
2  reports/expiredholds.pl
@@ -98,7 +98,7 @@ =head1 DESCRIPTION
# Printing results to screen
$template->param(results => \@rows);
output_html_with_http_headers $input, $cookie, $template->output;
- exit(1);
+ exit;
}
else {
# Printing to a csv file
View
4 reports/issues_avg_stats.pl
@@ -78,7 +78,7 @@ =head1 DESCRIPTION
# Printing results to screen
$template->param(mainloop => $results);
output_html_with_http_headers $input, $cookie, $template->output;
- exit(1);
+ exit;
} else {
# Printing to a csv file
print $input->header(-type => 'application/vnd.sun.xml.calc',
@@ -111,7 +111,7 @@ =head1 DESCRIPTION
print $sep.$col->{totalcol};
}
print $sep.@$results[0]->{total};
- exit(1);
+ exit;
}
# Displaying choices
} else {
View
2  reports/issues_stats.pl
@@ -124,7 +124,7 @@ =head1 DESCRIPTION
print map {$sep.$_->{totalcol}} @$cols;
print $sep.@$results[0]->{total};
}
- exit(1); # exit either way after $do_it
+ exit;
}
my $dbh = C4::Context->dbh;
View
2  reports/serials_stats.pl
@@ -127,7 +127,7 @@ =head1 DESCRIPTION
print $item->{startdate}.$sep;
print $item->{enddate}."\n";
}
- exit(1);
+ exit;
}
}else{
## We generate booksellers list
Please sign in to comment.
Something went wrong with that request. Please try again.