diff options
author | Brian Cully <bjc@kublai.com> | 2022-06-12 15:19:52 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2022-06-12 15:19:52 -0400 |
commit | a982d8ba8aa73bb316ebeb6f2eeabb304358b9fa (patch) | |
tree | 549c4fce57346c8a80a7a99b19a863da500eb0d1 /bin | |
parent | 0718a13ba8225c9d180b3207470876d048184310 (diff) | |
download | spamcat-a982d8ba8aa73bb316ebeb6f2eeabb304358b9fa.tar.gz spamcat-a982d8ba8aa73bb316ebeb6f2eeabb304358b9fa.zip |
Differentiate between 0 and undefined.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/spamcat | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/spamcat b/bin/spamcat index 60fdf46..dfc0876 100755 --- a/bin/spamcat +++ b/bin/spamcat @@ -96,7 +96,8 @@ if ($#ARGV >= 0) { } elsif ($cmd eq 'get') { my $sender = shift @ARGV; pod2usage(1) unless $sender; - my $count = $sch->get_count($sender) || $conf{default_count}; + my $count = $sch->get_count($sender); + $count = $conf{default_count} if (!defined $count); print "$sender has $count messages remaining.\n"; } elsif ($cmd eq 'set') { my ($sender, $count) = @ARGV; |