eliminiate noisy but harmless "Use of uninitialized value in numeric gt (>)" warning
authorivan <ivan>
Mon, 26 Oct 2009 01:11:53 +0000 (01:11 +0000)
committerivan <ivan>
Mon, 26 Oct 2009 01:11:53 +0000 (01:11 +0000)
FS/FS/part_pkg/flat.pm

index 02ac6ae..f9aaebe 100644 (file)
@@ -223,7 +223,7 @@ sub usage_valuehash {
 
 sub reset_usage {
   my($self, $cust_pkg, %opt) = @_;
-  warn "    resetting usage counters" if $opt{debug} > 1;
+  warn "   resetting usage counters" if defined($opt{debug}) && $opt{debug} > 1;
   my %values = $self->usage_valuehash;
   if ($self->option('usage_rollover', 1)) {
     $cust_pkg->recharge(\%values);