Skip to content

Commit

Permalink
Patched rakudo to look for .pm6 modules.
Browse files Browse the repository at this point in the history
Per the plan devised by Larry and Jonathan.

Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
  • Loading branch information
ingydotnet authored and moritz committed Apr 8, 2010
1 parent 8c434e8 commit 6b54693
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Perl6/Module/Locator.pm
Expand Up @@ -18,14 +18,20 @@ method find_candidates($lookfor, @inc) {
my $check_path := pir::substr__SSII($path, 0, pir::length__IS($path) - 1);
if pir::stat__ISI($check_path, 0) && pir::stat__ISI($check_path, 2) {
my @dir := pir::new__PS('OS').readdir($path);
my $candidate := "";
for @dir {
# pir::say(" readdir: $_");
if pir::substr__SSII($_, 0, pir::length__IS($file) + 1) eq $file ~ '.' &&
pir::substr__SSII($_, pir::length__IS($_) - 3, 3) eq '.pm' {
@candidates.push("$path$_");
# pir::say(" found: $path$_");
if pir::substr__SSII($_, 0, pir::length__IS($file) + 1) eq $file ~ '.' {
if pir::substr__SSII($_, pir::length__IS($_) - 4, 4) eq '.pm6' ||
!$candidate && pir::substr__SSII($_, pir::length__IS($_) - 3, 3) eq '.pm' {
$candidate := "$path$_";
}
}
}
if $candidate {
@candidates.push($candidate);
# pir::say(" found: $candidate");
}
}
}
return @candidates;
Expand Down

0 comments on commit 6b54693

Please sign in to comment.