8 use File
::Slurp qw
< slurp
>;
9 use Socket qw
< $CRLF $LF >;
11 my $ext = qr/(?: t | pm | sql | js | php | inc | xml )/x;
14 find
( sub { push @files, $File::Find
::name
if -f
&& /\. $ext $/x }, '.' );
16 plan tests
=> scalar @files;
18 for my $file (@files) {
19 my $cont = slurp
$file;
20 if ( $cont and $cont =~ $CRLF ) {
21 ok
0 => "$file contains windows newlines";
23 ok
1 => "$file is made of unix newlines and win";