Permalink
Browse files

Fixed included Module::Tools modules

  • Loading branch information...
1 parent d7953f6 commit 1c9eb11af7169a1b3dbf28c1c72384888cb0b91d @tadzik committed Sep 12, 2010
Showing with 11 additions and 1 deletion.
  1. +4 −0 tmplib/Module/Build.pm
  2. +7 −1 tmplib/Module/Install.pm
@@ -26,6 +26,10 @@ our sub build(Str $dir = '.', Str $binary = 'perl6', :$v) {
chdir $cwd;
return;
}
+ if "$dir/lib".IO !~~ :d {
+ # nothing to build
+ return;
+ }
my @module-files = find(dir => "$dir/lib", name => /\.pm6?$/).list;
@@ -12,7 +12,13 @@ our sub install(Str $dir = '.', Str $dest = "%*ENV<HOME>/.perl6/", :$v) {
run 'make install' and die "'make install' failed";
chdir $cwd;
} else {
- my @files = find(dir => "$dir/lib", name => /[\.pm6?$] | [\.pir$]/).list;
+ my @files;
+ if "$dir/lib".IO ~~ :d {
+ for find(dir => "$dir/lib",
+ name => /[\.pm6?$] | [\.pir$]/).list {
+ @files.push: $_
+ }
+ }
if "$dir/bin".IO ~~ :d {
for find(dir => "$dir/bin").list {
@files.push: $_

0 comments on commit 1c9eb11

Please sign in to comment.