This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Retract #12284.
[perl5.git] / lib / Cwd.pm
index 01f5ce4..d86527f 100644 (file)
@@ -188,6 +188,8 @@ $pwd_cmd ||= 'pwd';
 # The 'natural and safe form' for UNIX (pwd may be setuid root)
 sub _backtick_pwd {
     my $cwd = `$pwd_cmd`;
+    # Belt-and-suspenders in case someone said "undef $/".
+    local $/ = "\n";
     # `pwd` may fail e.g. if the disk is full
     chomp($cwd) if defined $cwd;
     $cwd;
@@ -499,6 +501,7 @@ sub _epoc_cwd {
         *fastcwd       = \&_NT_cwd;
         *fastgetcwd    = \&_NT_cwd;
         *abs_path      = \&fast_abs_path;
+        *realpath   = \&fast_abs_path;
     }
     elsif ($^O eq 'os2') {
         # sys_cwd may keep the builtin command