Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix docs for newest S11 changes
  • Loading branch information
retupmoca committed Mar 30, 2015
1 parent e2b9c87 commit c45f9f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Binary file modified README.md
Binary file not shown.
15 changes: 13 additions & 2 deletions lib/LibraryMake.pm6
Expand Up @@ -65,9 +65,20 @@ different in your own project.
# @*INC
sub library {
my $so = get-vars('')<SO>;
my $libname = "libfoo$so";
my $base = "lib/MyModule/$libname";
for @*INC {
if ($_~'/libfoo'~$so).IO ~~ :f {
return $_~'/libfoo'~$so;
if my @files = ($_.files($base) || $_.files("blib/$base")) {
my $files = @files[0]<files>;
my $tmp = $files{$base} || $files{"blib/$base"};
# copy to a temp dir
#
# This is required because CompUnitRepo::Local::Installation stores the file
# with a different filename (a number with no extension) that NativeCall doesn't
# know how to load. We do this copy to fix the filename.
$tmp.IO.copy($*SPEC.tmpdir ~ '/' ~ $lib);
return $*SPEC.tmpdir ~ '/' ~ $lib;
}
}
die "Unable to find library";
Expand Down

0 comments on commit c45f9f6

Please sign in to comment.