This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make the expensive ckWARN() be called as late as possible
[perl5.git] / Porting / curliff.pl
CommitLineData
39dbb0c0
JH
1#!/usr/bin/perl -ws
2
3# curliff.pl - convert certain files in the Perl distribution that
4# need to be in CR-LF format to CR-LF, or back to LF format (with the
5# -r option). The CR-LF format is NOT to be used for checking in
6# files to the Perforce repository, but it IS to be used when making
7# Perl snapshots or releases.
8
9use strict;
10
11use vars qw($r);
12
27da23d5 13# This list is also in makerel.
39dbb0c0
JH
14my @FILES = qw(
15 djgpp/configure.bat
16 README.ce
17 README.dos
27da23d5 18 README.symbian
39dbb0c0 19 README.win32
27da23d5
JH
20 symbian/config.pl
21 symbian/makesis.pl
22 symbian/README
23 symbian/xsbuild.pl
39dbb0c0
JH
24 win32/Makefile
25 win32/makefile.mk
27da23d5 26 wince/Makefile.ce
39dbb0c0 27 wince/compile-all.bat
39dbb0c0
JH
28 wince/README.perlce
29 wince/registry.bat
30 );
31
32{
33 local($^I, @ARGV) = ('.orig', @FILES);
34 while (<>) {
35 if ($r) {
36 s/\015\012/\012/; # Curliffs to liffs.
37 } else {
38 s/\015?\012/\015\012/; # Curliffs and liffs to curliffs.
39 }
40 print;
41 close ARGV if eof; # Reset $.
42 }
43}