From a45b45bb1348651ebb0ab7ec1221fce2376aa4a1 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sat, 4 Jul 1998 05:02:01 +0000 Subject: [PATCH] fix perlcc to not rm output file, and other -w(arts) p4raw-id: //depot/perl@1292 --- utils/perlcc.PL | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/utils/perlcc.PL b/utils/perlcc.PL index 5d9585b..a0161e5 100644 --- a/utils/perlcc.PL +++ b/utils/perlcc.PL @@ -143,7 +143,7 @@ sub _doit if ($errcode); _print("Compiling C($obj) for $file!\n", 36 ) if (!$options->{'gen'}); - my $errcode = _compileCode($file, $objfile, $obj) + $errcode = _compileCode($file, $objfile, $obj) if (!$options->{'gen'}); if ($errcode) @@ -163,9 +163,10 @@ sub _doit _removeCode($file) if ($options->{'e'}); - _removeCode($obj) if (($options->{'e'} && - ((!$options->{'sav'}) || !$options->{'o'})) || - ($options->{'run'} && (!$options->{'sav'}))); + _removeCode($obj) if (($options->{'e'} + && !$options->{'sav'} + && !$options->{'o'}) + || ($options->{'run'} && !$options->{'sav'})); } else { @@ -357,7 +358,7 @@ EOF _print("$ -I@INC $tmpfile\n", 36); _run("$ -I@INC $tmpfile", 9 ); - my $fd = new FileHandle ("$incfile"); + $fd = new FileHandle ("$incfile"); my @lines = <$fd>; unlink($tmpfile); @@ -458,9 +459,9 @@ sub _mungeRegexp { my ($regexp) = @_; - grep(s"(^|[^\\])\."$1\x0\\."g, @$regexp); - grep(s"(^|[^\x0])\\\."$1\."g, @$regexp); - grep(s"\x0""g, @$regexp); + grep(s:(^|[^\\])\.:$1\x00\\.:g, @$regexp); + grep(s:(^|[^\x00])\\\.:$1\.:g, @$regexp); + grep(s:\x00::g, @$regexp); } -- 2.7.4