summaryrefslogtreecommitdiff
path: root/pat/patcil.SH
diff options
context:
space:
mode:
Diffstat (limited to 'pat/patcil.SH')
-rwxr-xr-xpat/patcil.SH14
1 files changed, 6 insertions, 8 deletions
diff --git a/pat/patcil.SH b/pat/patcil.SH
index a4fae23..642bac2 100755
--- a/pat/patcil.SH
+++ b/pat/patcil.SH
@@ -61,8 +61,6 @@ $startperl
!GROK!THIS!
cat >>patcil <<'!NO!SUBS!'
-use File::Temp qw/ tempfile tempdir /;
-
$progname = &profile; # Read ~/.dist_profile
require 'getopts.pl';
&usage unless $#ARGV >= 0;
@@ -506,12 +504,12 @@ x Toggle patch# prefix.
sub edit {
local($text) = join("\n", @_);
- my $tmp = File::Temp->new();
- print $tmp $text;
- close $tmp;
- system $EDITOR, "$tmp";
- $text = `cat "$tmp"`;
- unlink "$tmp";
+ open(TMP,">/tmp/cil$$") || die "Can't create /tmp/cil$$";
+ print TMP $text;
+ close TMP;
+ system $EDITOR, "/tmp/cil$$";
+ $text = `cat /tmp/cil$$`;
+ unlink "/tmp/cil$$";
$text;
}