This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make prototype("CORE::mkdir") work. That's a special case,
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 19 Oct 2006 12:17:18 +0000 (12:17 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 19 Oct 2006 12:17:18 +0000 (12:17 +0000)
since from the OA_* flags we can't figure out which parameter
is going to default to $_.

p4raw-id: //depot/perl@29051

pp.c
t/op/cproto.t

diff --git a/pp.c b/pp.c
index ba01223..beee803 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -399,6 +399,10 @@ PP(pp_prototype)
                if (code == -KEY_chop || code == -KEY_chomp
                        || code == -KEY_exec || code == -KEY_system || code == -KEY_err)
                    goto set;
+               if (code == -KEY_mkdir) {
+                   ret = sv_2mortal(newSVpvs("_;$"));
+                   goto set;
+               }
                while (i < MAXO) {      /* The slow way. */
                    if (strEQ(s + 6, PL_op_name[i])
                        || strEQ(s + 6, PL_op_desc[i]))
index 49ba0d7..1b9cf4a 100644 (file)
@@ -138,7 +138,7 @@ lstat (*)
 lt ($$)
 m undef
 map undef
-mkdir (_;$) this prototype is not supported
+mkdir (_;$)
 msgctl ($$$)
 msgget ($$)
 msgrcv ($$$$$)