Skip to content

Commit

Permalink
Changes to make local build of other modules work
Browse files Browse the repository at this point in the history
Committing so that a fetch from Github will get this version, so that
Panda::Builder can build itself.
  • Loading branch information
lizmat committed Oct 3, 2014
1 parent 921f7e8 commit 209540b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions lib/Panda/Builder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ method build($where) {
}
my @files;
if 'lib'.IO.d {
@files = find(dir => 'lib', type => 'file').grep({
$_.basename.substr(0, 1) ne '.'
@files = find(dir => 'lib', type => 'file').map({
my $io = .IO;
$io if $io.basename.substr(0, 1) ne '.';
});
}
my @dirs = @files.map(*.directory).uniq;
Expand Down
2 changes: 1 addition & 1 deletion lib/Panda/Common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sub dirname ($mod as Str) is export {

sub indir ($where, Callable $what) is export {
mkpath $where;
temp $*CWD = $where.path.absolute;
temp $*CWD = $where.IO.absolute;
$what()
}

Expand Down
7 changes: 4 additions & 3 deletions lib/Panda/Fetcher.pm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ sub local-fetch($from, $to) {
my $cleanup = $from.IO.cleanup;
my $cleanup_chars = $cleanup.chars;
for eager find(dir => $from).list {
my $d = IO::Spec.catpath($_.volume, $_.directory, '');
my $io = .IO;
my $d = IO::Spec.catpath($io.volume, $io.directory, '');
# We need to cleanup the path, because the returned elems are too.
if ($d.Str.index(~$cleanup) // -1) == 0 {
$d = $d.substr($cleanup_chars)
Expand All @@ -55,8 +56,8 @@ sub local-fetch($from, $to) {
next if $d ~~ /^ '/'? '.git'/; # skip VCS files
my $where = "$to/$d";
mkpath $where;
next if $_.IO ~~ :d;
$_.copy("$where/{$_.basename}");
next if $io ~~ :d;
$io.copy("$where/{$io.basename}");
}
return True;
}
Expand Down

0 comments on commit 209540b

Please sign in to comment.