This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Clarifying comment to #12164.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 24 Sep 2001 12:08:30 +0000 (12:08 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 24 Sep 2001 12:08:30 +0000 (12:08 +0000)
p4raw-id: //depot/perl@12170

lib/Cwd.pm

index 680fc3e..d86527f 100644 (file)
@@ -188,8 +188,9 @@ $pwd_cmd ||= 'pwd';
 # The 'natural and safe form' for UNIX (pwd may be setuid root)
 sub _backtick_pwd {
     my $cwd = `$pwd_cmd`;
-    # `pwd` may fail e.g. if the disk is full
+    # 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;
 }