Skip to content

Commit

Permalink
Revert "Try to retry with system() if input file has compile error (a…
Browse files Browse the repository at this point in the history
…ssume not Perl script)"

Probably not a good decision. Compile error does not necessarily mean file is
not a Perl script. And there can be runtime error.

This reverts commit 7573682.
  • Loading branch information
sharyanto committed Jul 27, 2012
1 parent 7573682 commit 5141d18
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions bin/bench
Expand Up @@ -36,15 +36,8 @@ if ($code) {
my $prog = shift @ARGV;
my $aprog = abs_path($prog); # or die "can't abs_path($prog): $!\n";
say "Benchmarking $aprog ...";
eval {
require Bench; Bench->import;
do $aprog;
};
if ($@) {
# oops, probably not a Perl script?
Bench::_set_start_time();
system @ARGV;
}
require Bench; Bench->import;
do $aprog;
}

1;
Expand Down

0 comments on commit 5141d18

Please sign in to comment.