fix typo that caused INSTALLPRIVLIB to have doubled 'perl5'
[p5sagit/p5-mst-13.2.git] / lib / pwd.pl
index 0cc3d4e..47539aa 100644 (file)
@@ -1,5 +1,14 @@
 ;# pwd.pl - keeps track of current working directory in PWD environment var
 ;#
+#
+# This library is no longer being maintained, and is included for backward
+# compatibility with Perl 4 programs which may require it.
+#
+# In particular, this should not be used as an example of modern Perl
+# programming techniques.
+#
+# Suggested alternative: Cwd
+#
 ;# $RCSfile: pwd.pl,v $$Revision: 4.1 $$Date: 92/08/07 18:24:11 $
 ;#
 ;# $Log:       pwd.pl,v $
@@ -34,6 +43,7 @@ sub main'initpwd {
 
 sub main'chdir {
     local($newdir) = shift;
+    $newdir =~ s|/{2,}|/|g;
     if (chdir $newdir) {
        if ($newdir =~ m#^/#) {
            $ENV{'PWD'} = $newdir;