Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use $*DISTRO.path-sep instead of hacking it
  • Loading branch information
lizmat committed May 31, 2014
1 parent 6745862 commit 26d6073
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/core/Inc.pm
Expand Up @@ -2,13 +2,6 @@
my @INC;
my %CUSTOM_LIB;

#?if jvm
my $pathsep := $*VM.properties<path.separator>;
#?endif
#?if !jvm
my $pathsep := $*VM.config<osname> eq 'MSWin32' ?? ';' !! ':';
#?endif

my @all_paths;
sub make-cur($class, $path) {
@all_paths.push: $path;
Expand Down Expand Up @@ -54,12 +47,13 @@
}
}

add-curs(%*ENV<RAKUDOLIB>, $pathsep) if %*ENV<RAKUDOLIB>;
add-curs(%*ENV<PERL6LIB>, $pathsep) if %*ENV<PERL6LIB>;
my $path-sep := $*DISTRO.path-sep;
add-curs(%*ENV<RAKUDOLIB>, $path-sep) if %*ENV<RAKUDOLIB>;
add-curs(%*ENV<PERL6LIB>, $path-sep) if %*ENV<PERL6LIB>;

#?if jvm
for nqp::jvmclasspaths() -> $path {
add-curs($path, $pathsep) if nqp::stat($path, nqp::const::STAT_ISDIR);
add-curs($path, $path-sep) if nqp::stat($path, nqp::const::STAT_ISDIR);
}
#?endif

Expand Down

0 comments on commit 26d6073

Please sign in to comment.