summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-25 09:52:13 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-26 12:47:33 -0700
commitf6c684839d07b54a37b017abf03c0f37acb46919 (patch)
tree53b8cbbb2ee6a1cacb784db1964ad41108379b78 /pp_sys.c
parentc72a562989087cf45b7abfdbbfb4a823adac1604 (diff)
downloadperl-f6c684839d07b54a37b017abf03c0f37acb46919.tar.gz
&CORE::mkdir()
This commit allows &CORE::mkdir to be called through references and via ampersand syntax. pp_mkdir is modified to take into account the nulls pushed on to the stack in pp_coreargs, which happens because pp_coreargs has no other way to tell mkdir how many arguments it’s actually getting.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index e6ff35574a..6737845e34 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3773,7 +3773,7 @@ PP(pp_mkdir)
STRLEN len;
const char *tmps;
bool copy = FALSE;
- const int mode = (MAXARG > 1) ? POPi : 0777;
+ const int mode = (MAXARG > 1 && (TOPs||((void)POPs,0))) ? POPi : 0777;
TRIMSLASHES(tmps,len,copy);