diff options
| author | fukachan <fukachan> | 2002-12-23 21:28:32 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-12-23 21:28:32 +0000 |
| commit | 6b69139399925838751b9d9cb22b376b752cf72f (patch) | |
| tree | d2bd2581c6f9862a7e8d77d3abd795f5819734d1 /fml/lib/FML/Error/Analyze.pm | |
| parent | b25a87b36c4b871118b0db97e938d7420b4d06f1 (diff) | |
| download | fml8-6b69139399925838751b9d9cb22b376b752cf72f.tar.gz fml8-6b69139399925838751b9d9cb22b376b752cf72f.tar.bz2 fml8-6b69139399925838751b9d9cb22b376b752cf72f.zip | |
avoid undef warning.
Diffstat (limited to 'fml/lib/FML/Error/Analyze.pm')
| -rw-r--r-- | fml/lib/FML/Error/Analyze.pm | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/fml/lib/FML/Error/Analyze.pm b/fml/lib/FML/Error/Analyze.pm index 76a00b1f..e12d1dd2 100644 --- a/fml/lib/FML/Error/Analyze.pm +++ b/fml/lib/FML/Error/Analyze.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Analyze.pm,v 1.9 2002/12/12 04:57:53 fukachan Exp $ +# $FML: Analyze.pm,v 1.10 2002/12/18 04:23:41 fukachan Exp $ # package FML::Error::Analyze; @@ -169,7 +169,9 @@ sub error_continuity # debug info { - my ($addr, $ra, $sum); + my $addr = ''; + my $sum = 0; + my $ra = (); while (($addr, $ra) = each %$summary) { $sum = 0; for my $v (@$ra) { @@ -179,8 +181,8 @@ sub error_continuity } } - Log("summary: $addr sum=$sum (@$ra)"); - + my $array = __debug_printable_array($ra); + Log("summary: $addr sum=$sum ($array)"); push(@removelist, $addr) if $sum >= $limit; } } @@ -189,6 +191,24 @@ sub error_continuity } +# Descriptions: return array list with 0 padding (debug) +# Arguments: ARRAY_REF($ra) +# Side Effects: none +# Return Value: STR +sub __debug_printable_array +{ + my ($ra) = @_; + my $s = ''; + + for my $x (@$ra) { + $s .= defined $x ? $x : 0; + $s .= " "; + } + + return $s; +} + + =head1 CODING STYLE See C<http://www.fml.org/software/FNF/> on fml coding style guide. |
