summaryrefslogtreecommitdiff
path: root/lib/Benchmark.pm
diff options
context:
space:
mode:
authorSADAHIRO Tomoyuki <BQW10602@nifty.com>2006-11-23 07:32:46 +0900
committerSteve Peters <steve@fisharerojo.org>2006-11-22 14:10:07 +0000
commit72372890cb3d5f560a85287c60add9dd2f711a62 (patch)
treecbfe2baff47974048a4109b8fbf13e3453d3861d /lib/Benchmark.pm
parent6bd77ab211ed3195e5fdc702da1a76b94d71c839 (diff)
downloadperl-72372890cb3d5f560a85287c60add9dd2f711a62.tar.gz
Re: [perl #40917] Benchmark fails under -Mbignum
Message-Id: <20061122223227.193E.BQW10602@nifty.com> p4raw-id: //depot/perl@29348
Diffstat (limited to 'lib/Benchmark.pm')
-rw-r--r--lib/Benchmark.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm
index 24e339036f..bc40d2ddbe 100644
--- a/lib/Benchmark.pm
+++ b/lib/Benchmark.pm
@@ -161,7 +161,7 @@ The routines are called in string comparison order of KEY.
The COUNT can be zero or negative, see timethis().
-Returns a hash of Benchmark objects, keyed by name.
+Returns a hash reference of Benchmark objects, keyed by name.
=item timediff ( T1, T2 )
@@ -225,6 +225,8 @@ c<cmpthese> can also be passed the data structure that timethese() returns:
cmpthese( $results );
in case you want to see both sets of results.
+If the first argument is an unblessed hash reference,
+that is RESULTSHASHREF; otherwise that is COUNT.
Returns a reference to an ARRAY of rows, each row is an ARRAY of cells from the
above chart, including labels. This:
@@ -435,7 +437,7 @@ our(@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $VERSION);
clearcache clearallcache disablecache enablecache);
%EXPORT_TAGS=( all => [ @EXPORT, @EXPORT_OK ] ) ;
-$VERSION = 1.08;
+$VERSION = 1.09;
# --- ':hireswallclock' special handling
@@ -881,7 +883,8 @@ USAGE
sub cmpthese{
my ($results, $style);
- if( ref $_[0] ) {
+ # $count can be a blessed object.
+ if ( ref $_[0] eq 'HASH' ) {
($results, $style) = @_;
}
else {