/[vz-tools]/trunk/inc/Module/Install/AutoInstall.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/inc/Module/Install/AutoInstall.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 34 - (show annotations)
Thu Nov 8 11:35:15 2007 UTC (16 years, 5 months ago) by dpavlin
File size: 1210 byte(s)
added inc/ to enable installation from checkout
1 #line 1
2 package Module::Install::AutoInstall;
3
4 use strict;
5 use Module::Install::Base;
6
7 use vars qw{$VERSION $ISCORE @ISA};
8 BEGIN {
9 $VERSION = '0.67';
10 $ISCORE = 1;
11 @ISA = qw{Module::Install::Base};
12 }
13
14 sub AutoInstall { $_[0] }
15
16 sub run {
17 my $self = shift;
18 $self->auto_install_now(@_);
19 }
20
21 sub write {
22 my $self = shift;
23 $self->auto_install(@_);
24 }
25
26 sub auto_install {
27 my $self = shift;
28 return if $self->{done}++;
29
30 # Flatten array of arrays into a single array
31 my @core = map @$_, map @$_, grep ref,
32 $self->build_requires, $self->requires;
33
34 my @config = @_;
35
36 # We'll need Module::AutoInstall
37 $self->include('Module::AutoInstall');
38 require Module::AutoInstall;
39
40 Module::AutoInstall->import(
41 (@config ? (-config => \@config) : ()),
42 (@core ? (-core => \@core) : ()),
43 $self->features,
44 );
45
46 $self->makemaker_args( Module::AutoInstall::_make_args() );
47
48 my $class = ref($self);
49 $self->postamble(
50 "# --- $class section:\n" .
51 Module::AutoInstall::postamble()
52 );
53 }
54
55 sub auto_install_now {
56 my $self = shift;
57 $self->auto_install(@_);
58 Module::AutoInstall::do_install();
59 }
60
61 1;

  ViewVC Help
Powered by ViewVC 1.1.26