diff options
author | Abigail <abigail@abigail.be> | 2002-08-21 21:10:39 -0700 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-08-25 15:29:42 +0000 |
commit | 8962dfd6c069786370901f53b09ae56ec61390dd (patch) | |
tree | c86dfafe3480f20600f63f0e44ef31bf23e04d95 /lib/Benchmark.pm | |
parent | 69e2f04480336aed2ad842f2b92ce366bcd2e9e1 (diff) | |
download | perl-8962dfd6c069786370901f53b09ae56ec61390dd.tar.gz |
Make cmpthese work as documented.
Message-ID: <20020822041039.A2089@ucan.foad.org>
p4raw-id: //depot/perl@17774
Diffstat (limited to 'lib/Benchmark.pm')
-rw-r--r-- | lib/Benchmark.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index cda764f6ca..5ba9190211 100644 --- a/lib/Benchmark.pm +++ b/lib/Benchmark.pm @@ -196,7 +196,7 @@ Clear the cached time for COUNT rounds of the null loop. Clear all cached times. -=item cmpthese ( COUT, CODEHASHREF, [ STYLE ] ) +=item cmpthese ( COUNT, CODEHASHREF, [ STYLE ] ) =item cmpthese ( RESULTSHASHREF, [ STYLE ] ) @@ -412,7 +412,7 @@ use Exporter; clearcache clearallcache disablecache enablecache); %EXPORT_TAGS=( all => [ @EXPORT, @EXPORT_OK ] ) ; -$VERSION = 1.04; +$VERSION = 1.05; &init; @@ -713,7 +713,9 @@ sub timethese{ } sub cmpthese{ - my ($results, $style) = ref $_[0] ? @_ : ( timethese( @_[0,1,2] ), $_[2] ) ; + my ($results, $style) = + ref $_ [0] ? @_ + : (timethese (@_ [0, 1], @_ > 2 ? $_ [2] : "none"), $_ [2]); $style = "" unless defined $style; |