diff options
author | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1995-06-06 01:41:07 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1995-06-06 01:41:07 +0000 |
commit | 4aa0a1f7324b8447469670a1b2427c3ac2428bae (patch) | |
tree | f47ecacdb42503ee8ea8e4984302ab1aaad85431 /lib/Benchmark.pm | |
parent | 005c1a0e007f6f2f3efe461d6a5930a88ccb88fb (diff) | |
download | perl-4aa0a1f7324b8447469670a1b2427c3ac2428bae.tar.gz |
This is my patch patch.1l for perl5.001.
To apply, change to your perl directory, run the command above, then
apply with
patch -p1 -N < thispatch.
This patch fixes all the Configure & build problems for which I have a
solution.
After you apply this patch, I would recommend:
make distclean # or at the very least rm config.sh
sh Configure [whatever options you use]
make depend
make
make test
Patch and enjoy,
Andy Dougherty doughera@lafcol.lafayette.edu
Dept. of Physics
Lafayette College, Easton PA 18042
Here are the file-by-file contents:
Changes.Conf
Updated a bit.
Configure
Now honors hints on <pwd.h>-related things (for CX/UX, in particular).
Now honors previous values of d_stdio_ptr_lval and d_stdio_cnt_lval.
DB test programs now conditionally include 'const'.
MANIFEST
Updated.
config_H
Updated.
config_h.SH
Include trailing /**/ on STDIO_..._LVALUE defines.
hints/cxux.sh
Simplified.
Include info about failing test.
hints/epix.sh
A guess at a dynamic loading fix.
hints/next_3.sh
Add a few comments.
lib/Benchmark.pm
Ensure numeric context on number of loop iterations.
op.c
Spider's padlex and goto &$nonesuch patches.
perl.c
fputs("\tUnofficial patchlevel 1l.\n",stdout);
pp_ctl.c
pp_hot.c
scope.c
Spider's padlex and goto &$nonesuch patches.
Diffstat (limited to 'lib/Benchmark.pm')
-rw-r--r-- | lib/Benchmark.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm index 40481f9662..9929e6e0be 100644 --- a/lib/Benchmark.pm +++ b/lib/Benchmark.pm @@ -242,6 +242,7 @@ September 8th, 1994; by Tim Bunce. # Last updated: Sept 8th 94 by Tim Bunce # +use Carp; use Exporter; @ISA=(Exporter); @EXPORT=qw(timeit timethis timethese timediff timestr); @@ -315,6 +316,10 @@ sub timedebug{ sub runloop { my($n, $c) = @_; + + $n+=0; # force numeric now, so garbage won't creep into the eval + croak "negativ loopcount $n" if $n<0; + confess "Usage: runloop(number, string)" unless defined $c; my($t0, $t1, $td); # before, after, difference # find package of caller so we can execute code there @@ -326,7 +331,7 @@ sub runloop { my $subcode = "sub { package $pack; my(\$_i)=$n; while (\$_i--){$c;} }"; my $subref = eval $subcode; - die "runloop unable to compile '$c': $@\ncode: $subcode\n" if $@; + croak "runloop unable to compile '$c': $@\ncode: $subcode\n" if $@; print STDERR "runloop $n '$subcode'\n" if ($debug); $t0 = &new; |