Skip to content

Commit

Permalink
make custom Build.pm files work again.
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed May 24, 2013
1 parent 9f6e824 commit 6b2cc0d
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/Panda/Builder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,18 @@ sub build-order(@module-files) {
}

method build($where) {
return unless "$where/lib".IO ~~ :d;
indir $where, {
my @files = find(dir => 'lib', type => 'file').grep({
$_.name.substr(0, 1) ne '.'
});
# FIXME
#if "Build.pm".IO.f {
# @*INC.push('.');
# require 'Build';
# if ::('Build').isa(Panda::Builder) {
# ::('Build').new(resources => $!resources).build($p);
# }
# @*INC.pop;
#}
if "Build.pm".IO.f {
@*INC.push('.');
require 'Build.pm';
if ::('Build').isa(Panda::Builder) {
::('Build').new.build($where);
}
@*INC.pop;
}
my @dirs = @files.map(*.dir).uniq;
mkpath "blib/$_" for @dirs;

Expand Down

0 comments on commit 6b2cc0d

Please sign in to comment.