# New Ticket Created by Ahmad Zawawi
# Please include the string: [perl #59570]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59570 >
Hi,
With this patch, $*OS and $*EXECUTABLE_NAME are now working.
However, $?... is not working for some reason "Out of scope PAST::VAR"
thanks,
ahmad
Index: src/builtins/globals.pir
===================================================================
--- src/builtins/globals.pir (revision 31566)
+++ src/builtins/globals.pir (working copy)
@@ -30,6 +30,21 @@
$P0 = new 'Perl6Hash'
set_hll_global '%INC', $P0
+ ## set up $*OS
+ .local string osname
+ $P0 = new 'Perl6Str'
+ osname = sysinfo 4
+ $P0 = osname
+ set_hll_global '$OS', $P0
+
+ ## setup $*EXECUTABLE_NAME
+ .include "interpinfo.pasm"
+ .local string exename
+ $P0 = new 'Perl6Str'
+ exename = interpinfo .INTERPINFO_EXECUTABLE_FULLNAME
+ $P0 = exename
+ set_hll_global '$EXECUTABLE_NAME', $P0
+
## create $*IN, $*OUT, $*ERR filehandles
.local pmc pio, perl6io, perl6ioclass
perl6ioclass = get_hll_global "IO"