Make '-xx' and '-x x' work the same way (see #44387).
Abhijit Menon-Sen [Wed, 8 Aug 2007 18:45:34 +0000 (18:45 +0000)]
p4raw-id: //depot/perl@31690

perl.c

diff --git a/perl.c b/perl.c
index 6b02712..8b43a81 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1997,8 +1997,13 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
        case 'x':
            PL_doextract = TRUE;
            s++;
-           if (*s)
+           if (*s) {
                cddir = s;
+           }
+           else if ((s=argv[1]) && *s != '-') {
+               argc--,argv++;
+               cddir = s;
+           }
            break;
        case 0:
            break;