--- lib/MDAP.pm 2007/11/18 10:27:37 69 +++ lib/MDAP.pm 2007/11/18 10:28:28 70 @@ -27,6 +27,8 @@ once("this message will be reported just once"); +Returns true if this message was seen first time. + =cut our $once; @@ -34,7 +36,11 @@ sub once { my $m = join('', @_); $once->{$m}++; - print "$m\n" if ($once->{$m} == 1); + if ($once->{$m} == 1) { + print "$m\n"; + return 1; + } + return; } sub DESTROY {