Skip to content

Commit

Permalink
add $*EXECUTABLE, an absolute IO::Path to the perl6 runner
Browse files Browse the repository at this point in the history
$*EXECUTABLE_NAME is nice, but when it just contains "perl6-m" then you
cannot spawn a shell with it when "perl6-m" is not in PATH.
  • Loading branch information
FROGGS committed Mar 31, 2014
1 parent b777559 commit e9b185c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/core/terms.pm
Expand Up @@ -171,6 +171,19 @@ sub term:<time>() { nqp::p6box_i(nqp::time_i()) }
$VM<config><osname> eq 'MSWin32' ?? 'perl6-m.bat' !! 'perl6-m';
#?endif
nqp::bindkey(nqp::who(PROCESS), '$EXECUTABLE_NAME', $EXECUTABLE_NAME);

my $EXECUTABLE =
#?if parrot
nqp::p6box_s(pir::interpinfo__Si(pir::const::INTERPINFO_EXECUTABLE_FULLNAME));
#?endif
#?if jvm
$VM<properties><perl6.prefix> ~ '/bin/perl6-j';
#?endif
#?if moar
$VM<config><prefix> ~ '/bin/' ~ ($VM<config><osname> eq 'MSWin32' ?? 'perl6-m.bat' !! 'perl6-m');
#?endif
nqp::bindkey(nqp::who(PROCESS), '$EXECUTABLE', $EXECUTABLE.path.absolute);

my Mu $comp := nqp::getcomp('perl6');

my $PROGRAM_NAME = $comp.user-progname();
Expand Down

0 comments on commit e9b185c

Please sign in to comment.