summaryrefslogtreecommitdiff
path: root/lib/Benchmark.pm
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2002-08-21 21:10:39 -0700
committerhv <hv@crypt.org>2002-08-25 15:29:42 +0000
commit8962dfd6c069786370901f53b09ae56ec61390dd (patch)
treec86dfafe3480f20600f63f0e44ef31bf23e04d95 /lib/Benchmark.pm
parent69e2f04480336aed2ad842f2b92ce366bcd2e9e1 (diff)
downloadperl-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.pm8
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;