This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Set feature logical names in VMS init code.
authorCraig A. Berry <craigberry@mac.com>
Sun, 11 Nov 2012 14:45:28 +0000 (08:45 -0600)
committerCraig A. Berry <craigberry@mac.com>
Sun, 11 Nov 2012 14:45:28 +0000 (08:45 -0600)
When setting a CRTL feature, also record the setting in a user-mode
logical name since historically checking the environment is the only
way a Perl program can check a particular setting (otherwise we'd
need the currently vaporware VMS::Feature extension).

vms/vms.c

index 6d6e527..160f62e 100644 (file)
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -104,7 +104,12 @@ static int set_feature_default(const char *name, int value)
       return -1;
     }
 
-return 0;
+    /* Various things may check for an environment setting
+     * rather than the feature directly, so set that too.
+     */
+    vmssetuserlnm(name, value ? "ENABLE" : "DISABLE");
+
+    return 0;
 }
 #endif