This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Account for possibility of DOS file endings.
authorJames E Keenan <jkeenan@cpan.org>
Mon, 14 Nov 2016 22:22:22 +0000 (17:22 -0500)
committerJames E Keenan <jkeenan@cpan.org>
Thu, 17 Nov 2016 02:55:45 +0000 (21:55 -0500)
Although our source code (including this file) is supposed to have only Unix
line endings, cloning, etc., can result in particular users having DOS line
endings.  Let's allow '\r\n' to avoid spurious testing or installation
problems.

For: RT #130088, as recommended by Mark E Renzulli (UTRC).

Porting/pod_lib.pl [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 6eaacde..25cf691
@@ -403,7 +403,7 @@ sub __prime_state {
     my $filename = "pod/$source";
     my $contents = slurp_or_die($filename);
     my @want =
-        $contents =~ /perldelta - what is new for perl v(5)\.(\d+)\.(\d+)\n/;
+        $contents =~ /perldelta - what is new for perl v(5)\.(\d+)\.(\d+)\r?\n/;
     die "Can't extract version from $filename" unless @want;
     my $delta_leaf = join '', 'perl', @want, 'delta';
     $state{delta_target} = "$delta_leaf.pod";