2 package Module::Install::AutoInstall;
4 use Module::Install::Base;
5 @ISA = qw{Module::Install::Base};
11 sub AutoInstall { $_[0] }
15 $self->auto_install_now(@_);
20 $self->auto_install(@_);
25 return if $self->{done}++;
27 # Flatten array of arrays into a single array
28 my @core = map @$_, map @$_, grep ref,
29 $self->build_requires, $self->requires;
33 # We'll need Module::AutoInstall
34 $self->include('Module::AutoInstall');
35 require Module::AutoInstall;
37 Module::AutoInstall->import(
38 (@config ? (-config => \@config) : ()),
39 (@core ? (-core => \@core) : ()),
43 $self->makemaker_args( Module::AutoInstall::_make_args() );
45 my $class = ref($self);
47 "# --- $class section:\n" .
48 Module::AutoInstall::postamble()
52 sub auto_install_now {
54 $self->auto_install(@_);
55 Module::AutoInstall::do_install();