Craig A. Berry [Fri, 2 Jun 2006 23:18:08 +0000 (23:18 +0000)]
in PATH on VMS (and scrubbing them in t/test.pl).
p4raw-id: //depot/perl@28348
Stat_t st;
I32 i;
s = delimcpy(tmpbuf, tmpbuf + sizeof tmpbuf,
- s, strend, ':', &i);
+ s, strend,
+#ifdef VMS
+ '|', /* Hmm. How do we get $Config{path_sep} from C? */
+#else
+ ':',
+#endif
+ &i);
s++;
if (i >= (I32)sizeof tmpbuf /* too long -- assume the worst */
- || *tmpbuf != '/'
+#ifdef VMS
+ || !strchr(tmpbuf, ':') /* no colon thus no device name -- assume relative path */
+#else
+ || *tmpbuf != '/' /* no starting slash -- assume relative path */
+#endif
|| (PerlLIO_stat(tmpbuf, &st) == 0 && (st.st_mode & 2)) ) {
MgTAINTEDDIR_on(mg);
return 0;
my @keys = grep {exists $ENV{$_}} qw(CDPATH IFS ENV BASH_ENV);
local @ENV{@keys} = ();
# Untaint, plus take out . and empty string:
+ local $ENV{'DCL$PATH'} = $1 if $is_vms && ($ENV{'DCL$PATH'} =~ /(.*)/s);
$ENV{PATH} =~ /(.*)/s;
local $ENV{PATH} =
join $sep, grep { $_ ne "" and $_ ne "." and
- ($is_mswin or !(stat && (stat _)[2]&0022)) }
+ ($is_mswin or $is_vms or !(stat && (stat _)[2]&0022)) }
split quotemeta ($sep), $1;
$runperl =~ /(.*)/s;