In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/483efd0abe32386a3d82710532464cf4e9a0124b?hp=7c280bee056f2462f4b4aa2150a160fb9176601e>

- Log -----------------------------------------------------------------
commit 483efd0abe32386a3d82710532464cf4e9a0124b
Author: Craig A. Berry <[email protected]>
Date:   Thu Sep 1 13:30:28 2016 -0500

    Make PERLLIB_SEP dynamic on VMS.
    
    Because if we're running under a Unix shell, the path separator is
    likely to meet the expectations of Unix shell scripts better if it's
    the Unix ':' rather than the VMS '|'.  There is no change when
    running under DCL.
-----------------------------------------------------------------------

Summary of changes:
 embedvar.h        |  4 ++++
 makedef.pl        |  1 +
 perl.c            |  4 ++--
 perlapi.h         |  2 ++
 perlvars.h        |  7 +++++++
 pod/perldelta.pod | 12 ++++++++++--
 pod/perlvms.pod   |  6 ++++--
 regen/embed.pl    |  2 ++
 vms/vms.c         |  4 ++++
 9 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/embedvar.h b/embedvar.h
index 18f2c99..6092318 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -414,6 +414,10 @@
 #define PL_Gperlio_fd_refcnt_size      (my_vars->Gperlio_fd_refcnt_size)
 #define PL_perlio_mutex                (my_vars->Gperlio_mutex)
 #define PL_Gperlio_mutex       (my_vars->Gperlio_mutex)
+#ifdef __VMS
+#define PL_perllib_sep         (my_vars->Gperllib_sep)
+#define PL_Gperllib_sep                (my_vars->Gperllib_sep)
+#endif
 #define PL_ppaddr              (my_vars->Gppaddr)
 #define PL_Gppaddr             (my_vars->Gppaddr)
 #ifdef OS2
diff --git a/makedef.pl b/makedef.pl
index 80723ca..cb11e7e 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -206,6 +206,7 @@ if ($ARGS{PLATFORM} ne 'os2') {
         ++$skip{Perl_my_symlink} unless $Config{d_symlink};
     } else {
        ++$skip{PL_statusvalue_vms};
+       ++$skip{PL_perllib_sep};
        if ($ARGS{PLATFORM} ne 'aix') {
            ++$skip{$_} foreach qw(
                                PL_DBcv
diff --git a/perl.c b/perl.c
index 1ceed1c..afc9cbb 100644
--- a/perl.c
+++ b/perl.c
@@ -4655,8 +4655,8 @@ S_init_perllib(pTHX)
 #if defined(DOSISH) || defined(__SYMBIAN32__)
 #    define PERLLIB_SEP ';'
 #else
-#  if defined(VMS)
-#    define PERLLIB_SEP '|'
+#  if defined(__VMS)
+#    define PERLLIB_SEP PL_perllib_sep
 #  else
 #    define PERLLIB_SEP ':'
 #  endif
diff --git a/perlapi.h b/perlapi.h
index 960983d..91f50eb 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -149,6 +149,8 @@ END_EXTERN_C
 #define PL_perlio_fd_refcnt_size       (*Perl_Gperlio_fd_refcnt_size_ptr(NULL))
 #undef  PL_perlio_mutex
 #define PL_perlio_mutex                (*Perl_Gperlio_mutex_ptr(NULL))
+#undef  PL_perllib_sep
+#define PL_perllib_sep         (*Perl_Gperllib_sep_ptr(NULL))
 #undef  PL_ppaddr
 #define PL_ppaddr              (*Perl_Gppaddr_ptr(NULL))
 #undef  PL_sh_path
diff --git a/perlvars.h b/perlvars.h
index 89e2e1e..884d57c 100644
--- a/perlvars.h
+++ b/perlvars.h
@@ -248,3 +248,10 @@ PERLVAR(G, malloc_mutex, perl_mutex)       /* Mutex for 
malloc */
 
 PERLVARI(G, hash_seed_set, bool, FALSE)        /* perl.c */
 PERLVARA(G, hash_seed, PERL_HASH_SEED_BYTES, unsigned char) /* perl.c and hv.h 
*/
+
+/* The path separator can vary depending on whether we're running under DCL or
+ * a Unix shell.
+ */
+#ifdef __VMS
+PERLVAR(G, perllib_sep, char)
+#endif
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 89d810d..0898ab1 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -305,9 +305,17 @@ L</Modules and Pragmata> section.
 
 =over 4
 
-=item XXX-some-platform
+=item VMS
 
-XXX
+=over 4
+
+=item *
+
+The path separator for the C<PERL5LIB> and C<PERLLIB> environment entries is
+now a colon (C<:>) when running under a Unix shell. There is no change when
+running under DCL (it's still C<|>).
+
+=back
 
 =back
 
diff --git a/pod/perlvms.pod b/pod/perlvms.pod
index 2208257..e0d9803 100644
--- a/pod/perlvms.pod
+++ b/pod/perlvms.pod
@@ -326,8 +326,10 @@ improve performance at the expense of the BYTLM UAF quota.
 
 =head1 PERL5LIB and PERLLIB
 
-The PERL5LIB and PERLLIB logical names work as documented in L<perl>,
-except that the element separator is '|' instead of ':'.  The
+The PERL5LIB and PERLLIB environment elements work as documented in L<perl>,
+except that the element separator is, by default, '|' instead of ':'.
+However, when running under a Unix shell as determined by the logical
+name C<GNV$UNIX_SHELL>, the separator will be ':' as on Unix systems. The
 directory specifications may use either VMS or Unix syntax.
 
 =head1 The Perl Forked Debugger
diff --git a/regen/embed.pl b/regen/embed.pl
index 342e017..0b1ed0d 100755
--- a/regen/embed.pl
+++ b/regen/embed.pl
@@ -481,9 +481,11 @@ END
 
 for $sym (@globvar) {
     print $em "#ifdef OS2\n" if $sym eq 'sh_path';
+    print $em "#ifdef __VMS\n" if $sym eq 'perllib_sep';
     print $em multon($sym,   'G','my_vars->');
     print $em multon("G$sym",'', 'my_vars->');
     print $em "#endif\n" if $sym eq 'sh_path';
+    print $em "#endif\n" if $sym eq 'perllib_sep';
 }
 
 print $em <<'END';
diff --git a/vms/vms.c b/vms/vms.c
index d3a57ea..2a67a33 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -13986,6 +13986,9 @@ vmsperl_set_features(void)
         vms_unlink_all_versions = 0;
     }
 
+    /* The path separator in PERL5LIB is '|' unless running under a Unix 
shell. */
+    PL_perllib_sep = '|';
+
     /* Detect running under GNV Bash or other UNIX like shell */
     gnv_unix_shell = 0;
     status = simple_trnlnm("GNV$UNIX_SHELL", val_str, sizeof(val_str));
@@ -14000,6 +14003,7 @@ vmsperl_set_features(void)
         /* Reverse default ordering of PERL_ENV_TABLES. */
         defenv[0] = &crtlenvdsc;
         defenv[1] = &fildevdsc;
+        PL_perllib_sep = ':';
     }
     /* Some reasonable defaults that are not CRTL defaults */
     set_feature_default("DECC$EFS_CASE_PRESERVE", 1);

--
Perl5 Master Repository

Reply via email to