Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix handling of filename in require/use, ugexe++
  • Loading branch information
FROGGS committed Sep 14, 2015
1 parent 56634c5 commit a9407ef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/core/CompUnitRepo.pm
Expand Up @@ -75,14 +75,13 @@ RAKUDO_MODULE_DEBUG("Looking in $spec for $name")
}
}
elsif $file {
CompUnit.new($file.IO.absolute).load(GLOBALish, :$line);
my $path = $file.IO;
$path.e ?? CompUnit.new($path.absolute).load(GLOBALish, :$line)
!! nqp::die("Could not find file '$file' for module $module_name");
}
elsif self.candidates($module_name, :auth(%opts<auth>), :ver(%opts<ver>)) -> ($candi) {
$candi.load(GLOBALish, :$line)
}
elsif $file {
nqp::die("Could not find file '$file' for module $module_name");
}
else {
nqp::die("Could not find $module_name in any of:\n " ~
join("\n ", 'XXX'));
Expand Down

0 comments on commit a9407ef

Please sign in to comment.