SL::PrefixedNumber::set_to_max: mit undefinierten Werten klarkommen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 11 Jul 2013 07:20:09 +0000 (09:20 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 11 Jul 2013 07:29:56 +0000 (09:29 +0200)
SL/PrefixedNumber.pm

index 849421f..b3f6098 100644 (file)
@@ -64,7 +64,7 @@ sub set_to {
 sub set_to_max {
   my ($self, @numbers) = @_;
 
-  return $self->set_to(max map { SL::PrefixedNumber->new(number => $_)->_state->{ref_number} } @numbers);
+  return $self->set_to(max map { SL::PrefixedNumber->new(number => $_ // 0)->_state->{ref_number} } @numbers);
 }
 
 1;