summaryrefslogtreecommitdiff
path: root/Porting/bisect-runner.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-02-03 21:08:43 +0100
committerNicholas Clark <nick@ccl4.org>2012-02-03 21:08:43 +0100
commit529d2ac29a7e1446ff01792e873b23fec97920a1 (patch)
treeed367e63becc13b0e35d6d4b8db4c18353f8d171 /Porting/bisect-runner.pl
parente9e4ee6248c798dfc8aea40ae85f2fffcc37323a (diff)
downloadperl-529d2ac29a7e1446ff01792e873b23fec97920a1.tar.gz
Add -c option to bisect-runner.pl, for use with -e
This allows one to easily bisect to find when a something became, or stopped being, a (compile-time) syntax error.
Diffstat (limited to 'Porting/bisect-runner.pl')
-rwxr-xr-xPorting/bisect-runner.pl17
1 files changed, 12 insertions, 5 deletions
diff --git a/Porting/bisect-runner.pl b/Porting/bisect-runner.pl
index f15f92dd03..06845b5300 100755
--- a/Porting/bisect-runner.pl
+++ b/Porting/bisect-runner.pl
@@ -61,7 +61,7 @@ my %defines =
unless(GetOptions(\%options,
'target=s', 'make=s', 'jobs|j=i', 'expect-pass=i',
'expect-fail' => sub { $options{'expect-pass'} = 0; },
- 'clean!', 'one-liner|e=s', 'l', 'w', 'match=s',
+ 'clean!', 'one-liner|e=s', 'c', 'l', 'w', 'match=s',
'no-match=s' => sub {
$options{match} = $_[1];
$options{'expect-pass'} = 0;
@@ -284,6 +284,12 @@ which interferes with detecting errors in the example code itself.
=item *
+-c
+
+Add C<-c> to the command line, to cause perl to exit after syntax checking.
+
+=item *
+
-l
Add C<-l> to the command line with C<-e>
@@ -300,8 +306,8 @@ a full test case, instead of using C<bisect.pl>'s C<-e> shortcut.
Add C<-w> to the command line with C<-e>
-It's not valid to pass C<-l> or C<-w> to C<bisect.pl> unless you are also
-using C<-e>
+It's not valid to pass C<-c>, C<-l> or C<-w> to C<bisect.pl> unless you are
+also using C<-e>
=item *
@@ -1045,8 +1051,9 @@ match_and_exit($real_target, @ARGV) if $match;
if (defined $options{'one-liner'}) {
my $exe = $target =~ /^(?:perl$|test)/ ? 'perl' : 'miniperl';
unshift @ARGV, '-e', $options{'one-liner'};
- unshift @ARGV, '-l' if $options{l};
- unshift @ARGV, '-w' if $options{w};
+ foreach (qw(c l w)) {
+ unshift @ARGV, "-$_" if $options{$_};
+ }
unshift @ARGV, "./$exe", '-Ilib';
}