Skip to content
Permalink
Browse files

Fix up perl6-debug.

  • Loading branch information...
patzim committed Jan 30, 2019
1 parent 4b461bf commit 2c9c823c9940609523d7dac711ff9d0d0ffb2768
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/perl6-debug.nqp
@@ -445,6 +445,20 @@ class Perl6::Debugger is Perl6::Compiler {
}

sub MAIN(*@ARGS) {
# Determine Perl6 and NQP dirs.
my $sep := nqp::backendconfig()<osname> eq 'MSWin32' ?? '\\' !! '/';
my $exec-dir := nqp::substr(nqp::execname(), 0, nqp::rindex(nqp::execname(), $sep));
my $perl6-home := nqp::getenvhash()<PERL6_HOME> // $exec-dir ~ '/../share/perl6';
if (nqp::substr($perl6-home, nqp::chars($perl6-home) - 1) eq $sep) {
$perl6-home := nqp::substr($perl6-home, 0, nqp::chars($perl6-home) - 1);
}
my $nqp-home := nqp::getenvhash()<NQP_HOME> // $exec-dir ~ '/../share/nqp';
if (nqp::substr($nqp-home, nqp::chars($nqp-home) - 1) eq $sep) {
$nqp-home := nqp::substr($nqp-home, 0, nqp::chars($nqp-home) - 1);
}
nqp::bindhllsym('perl6', '$PERL6_HOME', $perl6-home);
nqp::bindhllsym('perl6', '$NQP_HOME', $nqp-home);

# XXX Parrot compat hack.
if nqp::islist(@ARGS[0]) {
@ARGS := @ARGS[0];

0 comments on commit 2c9c823

Please sign in to comment.
You can’t perform that action at this time.