[Rt-commit] r5493 - in DBIx-SearchBuilder/trunk: .
inc/Module/Install
ruz at bestpractical.com
ruz at bestpractical.com
Fri Jun 30 07:49:58 EDT 2006
Author: ruz
Date: Fri Jun 30 07:49:55 2006
New Revision: 5493
Modified:
DBIx-SearchBuilder/trunk/ (props changed)
DBIx-SearchBuilder/trunk/inc/Module/Install.pm
DBIx-SearchBuilder/trunk/inc/Module/Install/AutoInstall.pm
DBIx-SearchBuilder/trunk/inc/Module/Install/Base.pm
DBIx-SearchBuilder/trunk/inc/Module/Install/Makefile.pm
DBIx-SearchBuilder/trunk/inc/Module/Install/Metadata.pm
Log:
r1622 at cubic-pc: cubic | 2005-04-07 18:00:13 +0400
add inc/ file for auto install feature
Modified: DBIx-SearchBuilder/trunk/inc/Module/Install.pm
==============================================================================
Modified: DBIx-SearchBuilder/trunk/inc/Module/Install/AutoInstall.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/inc/Module/Install/AutoInstall.pm (original)
+++ DBIx-SearchBuilder/trunk/inc/Module/Install/AutoInstall.pm Fri Jun 30 07:49:55 2006
@@ -1,15 +1,6 @@
-#line 1
+#line 1 "inc/Module/Install/AutoInstall.pm - /usr/lib/perl5/site_perl/5.8.5/Module/Install/AutoInstall.pm"
package Module::Install::AutoInstall;
-
-use strict;
-use Module::Install::Base;
-
-use vars qw{$VERSION $ISCORE @ISA};
-BEGIN {
- $VERSION = '0.62';
- $ISCORE = 1;
- @ISA = qw{Module::Install::Base};
-}
+use Module::Install::Base; @ISA = qw(Module::Install::Base);
sub AutoInstall { $_[0] }
@@ -27,35 +18,45 @@
my $self = shift;
return if $self->{done}++;
+# ExtUtils::AutoInstall Bootstrap Code, version 7.
+AUTO:{my$p='ExtUtils::AutoInstall';my$v=0.49;$p->VERSION||0>=$v
+or+eval"use $p $v;1"or+do{my$e=$ENV{PERL_EXTUTILS_AUTOINSTALL};
+(!defined($e)||$e!~m/--(?:default|skip|testonly)/and-t STDIN or
+eval"use ExtUtils::MakeMaker;WriteMakefile(PREREQ_PM=>{'$p',$v}
+);1"and exit)and print"==> $p $v required. Install it from CP".
+"AN? [Y/n] "and<STDIN>!~/^n/i and print"*** Installing $p\n"and
+do{if (eval '$>' and lc(`sudo -V`) =~ /version/){system('sudo',
+$^X,"-MCPANPLUS","-e","CPANPLUS::install $p");eval"use $p $v;1"
+||system('sudo', $^X, "-MCPAN", "-e", "CPAN::install $p")}eval{
+require CPANPLUS;CPANPLUS::install$p};eval"use $p $v;1"or eval{
+require CPAN;CPAN::install$p};eval"use $p $v;1"||die"*** Please
+manually install $p $v from cpan.org first...\n"}}}
+
# Flatten array of arrays into a single array
my @core = map @$_, map @$_, grep ref,
$self->build_requires, $self->requires;
- my @config = @_;
+ while ( @core and @_ > 1 and $_[0] =~ /^-\w+$/ ) {
+ push @core, splice(@_, 0, 2);
+ }
- # We'll need Module::AutoInstall
- $self->include('Module::AutoInstall');
- require Module::AutoInstall;
-
- Module::AutoInstall->import(
- (@config ? (-config => \@config) : ()),
- (@core ? (-core => \@core) : ()),
- $self->features,
+ ExtUtils::AutoInstall->import(
+ (@core ? (-core => \@core) : ()), @_, $self->features
);
- $self->makemaker_args( Module::AutoInstall::_make_args() );
+ $self->makemaker_args( ExtUtils::AutoInstall::_make_args() );
my $class = ref($self);
$self->postamble(
"# --- $class section:\n" .
- Module::AutoInstall::postamble()
+ ExtUtils::AutoInstall::postamble()
);
}
sub auto_install_now {
my $self = shift;
- $self->auto_install(@_);
- Module::AutoInstall::do_install();
+ $self->auto_install;
+ ExtUtils::AutoInstall::do_install();
}
1;
Modified: DBIx-SearchBuilder/trunk/inc/Module/Install/Base.pm
==============================================================================
Modified: DBIx-SearchBuilder/trunk/inc/Module/Install/Makefile.pm
==============================================================================
Modified: DBIx-SearchBuilder/trunk/inc/Module/Install/Metadata.pm
==============================================================================
More information about the Rt-commit
mailing list