- if ($^O ne 'MSWin32') {
- $old_perm = (stat $pathfile)[2] & 07777;
- my $new_perm = $old_perm | 0200;
- chmod $new_perm, $pathfile;
- }
- tie @filearray, 'Tie::File', $pathfile or die $!;
+ $old_perm = (stat $pathfile)[2] & 07777;
+ my $new_perm = $old_perm | 0200;
+ chmod $new_perm, $pathfile;
+
+ # tie the file -- note that we're explicitly setting the line (record)
+ # separator to hex 0A (the Unix newline) because that's what
+ # the files copied to blib are using, regardless of whether the install
+ # is under a Unix variant or Windows.
+ tie @filearray, 'Tie::File', $pathfile, recsep => "\x0a" or die $!;
+