[ID 20001120.010] typo in lib/Cwd.pm broke Cwd::chdir
[p5sagit/p5-mst-13.2.git] / lib / Cwd.pm
index 7279591..840e2a6 100644 (file)
@@ -188,7 +188,7 @@ sub chdir_init {
 }
 
 sub chdir {
-    my $newdir = @? ? shift : '';      # allow for no arg (chdir to HOME dir)
+    my $newdir = @_ ? shift : '';      # allow for no arg (chdir to HOME dir)
     $newdir =~ s|///*|/|g unless $^O eq 'MSWin32';
     chdir_init() unless $chdir_init;
     return 0 unless CORE::chdir $newdir;
@@ -408,7 +408,8 @@ sub _epoc_cwd {
         *abs_path      = \&fast_abs_path;
     }
     elsif ($^O eq 'epoc') {
-        *getcwd        = \&_epoc_cwd;
+        *cwd            = \&_epoc_cwd;
+        *getcwd                = \&_epoc_cwd;
         *fastgetcwd    = \&_epoc_cwd;
         *fastcwd       = \&_epoc_cwd;
         *abs_path      = \&fast_abs_path;