Skip to content

Commit

Permalink
[ModuleLoader] strip away Unixy './' in module path
Browse files Browse the repository at this point in the history
This prevented the lookup from working on Linux. Works now.
  • Loading branch information
Carl Masak committed May 7, 2011
1 parent 120ff08 commit 2656070
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ModuleLoader.pm
Expand Up @@ -123,6 +123,9 @@ knowhow ModuleLoader {
# May be fake executable, so may not end in .pbc. If so, add it.
# Strip any .exe.
my $module_name := ((pir::getinterp__P())[2])[0];
if pir::substr($module_name, 0, 2) eq './' {
$module_name := pir::substr($module_name, 2, pir::length($module_name) - 2);
}
if pir::substr($module_name, pir::length($module_name) - 4, 4) eq '.pbc' {
# Fine as it is.
}
Expand Down

0 comments on commit 2656070

Please sign in to comment.