clearcache clearallcache disablecache enablecache);
%EXPORT_TAGS=( all => [ @EXPORT, @EXPORT_OK ] ) ;
-$VERSION = 1.06;
+$VERSION = 1.07;
# --- ':hireswallclock' special handling
# &runloop a lot, and thus reduce additive errors.
my $tbase = Benchmark->new(0)->[1];
while ( ( $t0 = Benchmark->new(0) )->[1] == $tbase ) {} ;
- &$subref;
+ $subref->();
$t1 = Benchmark->new($n);
$td = &timediff($t1, $t0);
timedebug("runloop:",$td);
use warnings;
use strict;
use vars qw($foo $bar $baz $ballast);
-use Test::More tests => 193;
+use Test::More tests => 194;
use Benchmark qw(:all);
isa_ok(timeit(5, '++$bar'), 'Benchmark', "timeit eval");
is ($bar, 5, "benchmarked code was run 5 times");
+# is coderef called with spurious arguments?
+timeit( 1, sub { $foo = @_ });
+is ($foo, 0, "benchmarked code called without arguments");
+
+
print "# Burning CPU to benchmark things will take time...\n";