diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-10-01 19:02:17 -0400 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-10-01 19:02:17 -0400 |
commit | 552a7a9bd7c71973e24c16b391cbb65050f28fae (patch) | |
tree | 0f6e3d6527e545aecaf02a2c7aff08ec75aacd18 /perl.c | |
parent | c6ecf61fd8db79f1fc1b90463b6c61a4267ab923 (diff) | |
download | perl-552a7a9bd7c71973e24c16b391cbb65050f28fae.tar.gz |
perl 5.003_06: perl.c
From: Roderick Schertler <roderick@gate.net>
Subject: Re: -T flag and removal of `.' from @INC
support C<perl -e'attached code'>
Date: Tue, 01 Oct 1996 19:02:17 -0400
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Subject: Re: 2 core dumps (patch)
Message-Id: <199610012302.TAA08395@aatma.engin.umich.edu>
The problem is an uninitialized SV slot in errgv. Here's a patch.
Date: Thu, 03 Oct 1996 16:31:46 -0400 (EDT)
From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>
Subject: VMS patches to 5.003_05
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -395,10 +395,14 @@ setuid perl scripts securely.\n"); if (!e_fp) croak("Cannot open temporary file"); } - if (argv[1]) { + if (*++s) + PerlIO_puts(e_fp,s); + else if (argv[1]) { PerlIO_puts(e_fp,argv[1]); argc--,argv++; } + else + croak("No code specified for -e"); (void)PerlIO_putc(e_fp,'\n'); break; case 'I': @@ -1380,6 +1384,7 @@ init_main_stash() defgv = gv_fetchpv("_",TRUE, SVt_PVAV); errgv = gv_HVadd(gv_fetchpv("@", TRUE, SVt_PV)); GvMULTI_on(errgv); + sv_setpvn(GvSV(errgv), "", 0); curstash = defstash; compiling.cop_stash = defstash; debstash = GvHV(gv_fetchpv("DB::", GV_ADDMULTI, SVt_PVHV)); @@ -2113,11 +2118,24 @@ init_perllib() { char *s; if (!tainting) { +#ifndef VMS s = getenv("PERL5LIB"); if (s) incpush(s); else incpush(getenv("PERLLIB")); +#else /* VMS */ + /* Treat PERL5?LIB as a possible search list logical name -- the + * "natural" VMS idiom for a Unix path string. We allow each + * element to be a set of |-separated directories for compatibility. + */ + char buf[256]; + int idx = 0; + if (my_trnlnm("PERL5LIB",buf,0)) + do { incpush(buf); } while (my_trnlnm("PERL5LIB",buf,++idx)); + else + while (my_trnlnm("PERLLIB",buf,idx++)) incpush(buf); +#endif /* VMS */ } /* Use the ~-expanded versions of APPLIB (undocumented), |