Subject: | Benchmark::Timer->get_report() error for undefined $event |
I've noticed this in Benchmark-Timer-0.6 and -0.6.1, in Perl 5.8.0 on linux (although this isn't Perl version/OS specific...)
The documentation for the get_report subroutine states that, if no event tag is passed in, a report for all events is returned. However, only the timing report for $self->[LASTEVENT] is actually returned.
I have provided a small contextual diff as an attachment, for your perusal and possible use.
Cheers,
susan
*** oldTimer.pm Thu Sep 16 18:00:46 2004
--- newTimer.pm Thu Sep 16 18:00:49 2004
***************
*** 372,376 ****
sub get_report {
my $self = shift;
! my $event = shift || $self->[LASTEVENT] || undef;
my $report = '';
--- 372,376 ----
sub get_report {
my $self = shift;
! my $event = shift || undef;
my $report = '';