2 package Module::Install::Build;
5 use Module::Install::Base;
7 use vars qw{$VERSION $ISCORE @ISA};
11 @ISA = qw{Module::Install::Base};
18 die "Build->write() takes no arguments\n" if @_;
23 $args{dist_name} = $self->name || $self->determine_NAME($self->{args});
24 $args{license} = $self->license;
25 $args{test_files} = $self->tests;
26 $args{dist_version} = $self->version || $self->determine_VERSION($self->{args});
27 $args{dist_abstract} = $self->abstract;
28 $args{dist_author} = $self->author;
29 $args{sign} = $self->sign;
30 $args{no_index} = $self->no_index;
32 foreach my $key (qw(build_requires requires recommends conflicts)) {
33 my $val = eval "\$self->$key" or next;
34 $args{$key} = { map @$_, @$val };
37 %args = map {($_, $args{$_})} grep {defined($args{$_})} keys %args;
39 require Module::Build;
40 $build = Module::Build->new(%args);
41 $build->add_to_cleanup(split /\s+/, $self->clean_files);
42 $build->create_build_script;
47 die "XXX - Can't get this working yet";
49 warn "Removing inc\n";
55 die "XXX - Can't get this working yet";
58 # <ingy> DrMath: is there an OO way to add actions to Module::Build??
60 # <DrMath> ingy: package MyBuilder; use w(Module::Build; @ISA = qw(w(Module::Build); sub ACTION_ingy
62 # <DrMath> ingy: then my $build = new MyBuilder( ...parameters... );
63 # $build->write_build_script;