Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$*OS and $*EXECUTABLE_NAME globals initial implementation #354

Closed
p6rt opened this issue Oct 2, 2008 · 3 comments
Closed

$*OS and $*EXECUTABLE_NAME globals initial implementation #354

p6rt opened this issue Oct 2, 2008 · 3 comments

Comments

@p6rt
Copy link

p6rt commented Oct 2, 2008

Migrated from rt.perl.org#59570 (status was 'resolved')

Searchable as RT59570$

@p6rt
Copy link
Author

p6rt commented Oct 2, 2008

From @azawawi

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"

@p6rt
Copy link
Author

p6rt commented Oct 7, 2008

From @particle

applied with modifications in r31757.
~jerry

@p6rt
Copy link
Author

p6rt commented Oct 7, 2008

@particle - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Oct 7, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant