summaryrefslogtreecommitdiff
path: root/warnings.pl
diff options
context:
space:
mode:
authorJim Cromie <jcromie@cpan.org>2008-03-11 12:16:14 -0600
committerNicholas Clark <nick@ccl4.org>2008-03-15 17:30:19 +0000
commitb6b9a09997c80269af874aff41936e014ed728f7 (patch)
tree461c4ca1dd9e80df65f170edfb6797c4eafe2a22 /warnings.pl
parentb2866d4731cba846ea38e592b806a44f665742ca (diff)
downloadperl-b6b9a09997c80269af874aff41936e014ed728f7.tar.gz
Re: [patch] refine make regen to be more selective
Message-ID: <47D720CE.7060004@gmail.com> Date: Tue, 11 Mar 2008 18:16:14 -0600 p4raw-id: //depot/perl@33537
Diffstat (limited to 'warnings.pl')
-rw-r--r--warnings.pl11
1 files changed, 6 insertions, 5 deletions
diff --git a/warnings.pl b/warnings.pl
index 97d5d14bab..b639fc6cf4 100644
--- a/warnings.pl
+++ b/warnings.pl
@@ -3,7 +3,8 @@
$VERSION = '1.02_02';
BEGIN {
- push @INC, './lib';
+ require 'regen_lib.pl';
+ push @INC, './lib';
}
use strict ;
@@ -249,11 +250,9 @@ if (@ARGV && $ARGV[0] eq "tree")
exit ;
}
-unlink "warnings.h";
-unlink "lib/warnings.pm";
-open(WARN, ">warnings.h") || die "Can't create warnings.h: $!\n";
+open(WARN, ">warnings.h-new") || die "Can't create warnings.h: $!\n";
+open(PM, ">lib/warnings.pm-new") || die "Can't create lib/warnings.pm: $!\n";
binmode WARN;
-open(PM, ">lib/warnings.pm") || die "Can't create lib/warnings.pm: $!\n";
binmode PM;
print WARN <<'EOM' ;
@@ -366,6 +365,7 @@ print WARN <<'EOM';
EOM
close WARN ;
+safer_rename("warnings.h-new", "warnings.h");
while (<DATA>) {
last if /^KEYWORDS$/ ;
@@ -427,6 +427,7 @@ while (<DATA>) {
print PM "# ex: set ro:\n";
close PM ;
+safer_rename("lib/warnings.pm-new", "lib/warnings.pm");
__END__
# -*- buffer-read-only: t -*-