summaryrefslogtreecommitdiff
path: root/lib/Loadbars/Utils.pm
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-13 20:48:13 +0200
committerPaul Buetow <paul@buetow.org>2026-02-13 20:48:13 +0200
commitbd095a1b9a2027a1ff43fe4b6fa04d0354ca062c (patch)
treeed4c8fad86c1b8347cc86020e0793822ae76a788 /lib/Loadbars/Utils.pm
parent20e3db5bcb04bc57377432126404b5e99d0b0a92 (diff)
Convert POD documentation to Markdown and migrate to Justfile
- Convert all POD files to Markdown format - Replace Makefile with justfile for build automation - Remove deprecated Debian packaging files and related directories - Update copyright year from 2013 to 2026 in Constants.pm and loadbars - Remove obsolete docs directory (bugs, wishlist, and generated files) - Fix sum() function in Utils.pm to handle undef values properly
Diffstat (limited to 'lib/Loadbars/Utils.pm')
-rw-r--r--lib/Loadbars/Utils.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Loadbars/Utils.pm b/lib/Loadbars/Utils.pm
index b4798f0..56b829d 100644
--- a/lib/Loadbars/Utils.pm
+++ b/lib/Loadbars/Utils.pm
@@ -25,7 +25,7 @@ our @EXPORT = qw (
sub say (@) { print "$_\n" for @_; return undef }
sub newline () { say ''; return undef }
sub debugsay (@) { say "Loadbars::DEBUG: $_" for @_; return undef }
-sub sum (@) { my $sum = 0; $sum += $_ for @_; return $sum }
+sub sum (@) { my $sum = 0; $sum += $_ // 0 for @_; return $sum }
sub null ($) { defined $_[0] ? $_[0] : 0 }
sub notnull ($) { $_[0] != 0 ? $_[0] : 1 }
sub error ($) { die shift, "\n" }