From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <1ff86f510708150739q18fa5863s55010b538d11f77f@mail.gmail.com>
Updated patch originally by Reini Urban.
p4raw-id: //depot/perl@31737
dXSARGS;
char *cwd;
- if(items != 0)
+ /* See http://rt.perl.org/rt3/Ticket/Display.html?id=38628
+ There is Cwd->cwd() usage in the wild, and previous versions didn't die.
+ */
+ if(items > 1)
Perl_croak(aTHX_ "Usage: Cwd::cwd()");
if((cwd = getcwd(NULL, -1))) {
ST(0) = sv_2mortal(newSVpv(cwd, 0));
}
}
-use Test::More tests => 14;
+use Test::More tests => 15;
is(Cygwin::winpid_to_pid(Cygwin::pid_to_winpid($$)), $$,
"perl pid translates to itself");
is($i->[2].",".$i->[3], $rootmnt, "same root mount flags");
}
}
+
+ok(Cwd->cwd(), "bug#38628 legacy");