X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl.c;h=69b5c0edccd0cdf5ffa0dcd670de5ce8b736f927;hb=90248788f819cf7b59aabb5259fdd6d66bc4632b;hp=c52f2cc04ab5728035831e6b9d091abc8c8baa82;hpb=137a30823a8754a31051e7dd9a85a8dddd6e7670;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perl.c b/perl.c index c52f2cc..69b5c0e 100644 --- a/perl.c +++ b/perl.c @@ -694,12 +694,23 @@ print \" \\@INC:\\n @INC\\n\";"); cddir = savepv(s); break; case '-': + if (*++s) { /* catch use of gnu style long options */ + if (strEQ(s, "version")) { + s = "v"; + goto reswitch; + } + if (strEQ(s, "help")) { + s = "h"; + goto reswitch; + } + croak("Unrecognized switch: --%s (-h will show valid options)",s); + } argc--,argv++; goto switch_end; case 0: break; default: - croak("Unrecognized switch: -%s",s); + croak("Unrecognized switch: -%s (-h will show valid options)",s); } } switch_end: @@ -1310,7 +1321,7 @@ char *name; printf("\n -U allow unsafe operations"); printf("\n -v print version number and patchlevel of perl"); printf("\n -V[:variable] print perl configuration information"); - printf("\n -w TURN WARNINGS ON FOR COMPILATION OF YOUR SCRIPT."); + printf("\n -w TURN WARNINGS ON FOR COMPILATION OF YOUR SCRIPT. Recommended."); printf("\n -x[directory] strip off text before #!perl line and perhaps cd to directory\n"); } @@ -2323,6 +2334,7 @@ static void init_lexer() { tmpfp = rsfp; + rsfp = Nullfp; lex_start(linestr); rsfp = tmpfp; subname = newSVpv("main",4);