Change 29348 by [EMAIL PROTECTED] on 2006/11/22 14:10:07
Subject: Re: [perl #40917] Benchmark fails under -Mbignum
From: SADAHIRO Tomoyuki <[EMAIL PROTECTED]>
Date: Wed, 22 Nov 2006 22:32:46 +0900
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/lib/Benchmark.pm#42 edit
Differences ...
==== //depot/perl/lib/Benchmark.pm#42 (text) ====
Index: perl/lib/Benchmark.pm
--- perl/lib/Benchmark.pm#41~28393~ 2006-06-14 05:11:13.000000000 -0700
+++ perl/lib/Benchmark.pm 2006-11-22 06:10:07.000000000 -0800
@@ -161,7 +161,7 @@
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 @@
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 @@
clearcache clearallcache disablecache enablecache);
%EXPORT_TAGS=( all => [ @EXPORT, @EXPORT_OK ] ) ;
-$VERSION = 1.08;
+$VERSION = 1.09;
# --- ':hireswallclock' special handling
@@ -881,7 +883,8 @@
sub cmpthese{
my ($results, $style);
- if( ref $_[0] ) {
+ # $count can be a blessed object.
+ if ( ref $_[0] eq 'HASH' ) {
($results, $style) = @_;
}
else {
End of Patch.