[Jifty-commit] r1618 - in Bubble: Bubble-Lib/inc/Module/Install

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Wed Jul 19 15:12:20 EDT 2006


Author: jesse
Date: Wed Jul 19 15:12:10 2006
New Revision: 1618

Added:
   Bubble/Bubble-Lib/inc/Module/Install/AutoInstall.pm
   Bubble/Bubble-Lib/inc/Module/Install/Include.pm
   Bubble/Bubble-Lib/inc/Module/Install/Share.pm
Modified:
   Bubble/   (props changed)

Log:
 r14186 at pinglin:  jesse | 2006-07-19 09:39:18 -0700
 * inc updates


Added: Bubble/Bubble-Lib/inc/Module/Install/AutoInstall.pm
==============================================================================
--- (empty file)
+++ Bubble/Bubble-Lib/inc/Module/Install/AutoInstall.pm	Wed Jul 19 15:12:10 2006
@@ -0,0 +1,61 @@
+#line 1
+package Module::Install::AutoInstall;
+
+use strict;
+use Module::Install::Base;
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+	$VERSION = '0.63';
+	$ISCORE  = 1;
+	@ISA     = qw{Module::Install::Base};
+}
+
+sub AutoInstall { $_[0] }
+
+sub run {
+    my $self = shift;
+    $self->auto_install_now(@_);
+}
+
+sub write {
+    my $self = shift;
+    $self->auto_install(@_);
+}
+
+sub auto_install {
+    my $self = shift;
+    return if $self->{done}++;
+
+    # Flatten array of arrays into a single array
+    my @core = map @$_, map @$_, grep ref,
+               $self->build_requires, $self->requires;
+
+    my @config = @_;
+
+    # We'll need Module::AutoInstall
+    $self->include('Module::AutoInstall');
+    require Module::AutoInstall;
+
+    Module::AutoInstall->import(
+        (@config ? (-config => \@config) : ()),
+        (@core   ? (-core   => \@core)   : ()),
+        $self->features,
+    );
+
+    $self->makemaker_args( Module::AutoInstall::_make_args() );
+
+    my $class = ref($self);
+    $self->postamble(
+        "# --- $class section:\n" .
+        Module::AutoInstall::postamble()
+    );
+}
+
+sub auto_install_now {
+    my $self = shift;
+    $self->auto_install(@_);
+    Module::AutoInstall::do_install();
+}
+
+1;

Added: Bubble/Bubble-Lib/inc/Module/Install/Include.pm
==============================================================================
--- (empty file)
+++ Bubble/Bubble-Lib/inc/Module/Install/Include.pm	Wed Jul 19 15:12:10 2006
@@ -0,0 +1,34 @@
+#line 1
+package Module::Install::Include;
+
+use strict;
+use Module::Install::Base;
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+	$VERSION = '0.63';
+	$ISCORE  = 1;
+	@ISA     = qw{Module::Install::Base};
+}
+
+sub include {
+	shift()->admin->include(@_);
+}
+
+sub include_deps {
+	shift()->admin->include_deps(@_);
+}
+
+sub auto_include {
+	shift()->admin->auto_include(@_);
+}
+
+sub auto_include_deps {
+	shift()->admin->auto_include_deps(@_);
+}
+
+sub auto_include_dependent_dists {
+	shift()->admin->auto_include_dependent_dists(@_);
+}
+
+1;

Added: Bubble/Bubble-Lib/inc/Module/Install/Share.pm
==============================================================================
--- (empty file)
+++ Bubble/Bubble-Lib/inc/Module/Install/Share.pm	Wed Jul 19 15:12:10 2006
@@ -0,0 +1,40 @@
+#line 1
+package Module::Install::Share;
+
+use strict;
+use Module::Install::Base;
+
+use vars qw{$VERSION $ISCORE @ISA};
+BEGIN {
+	$VERSION = '0.63';
+	$ISCORE  = 1;
+	@ISA     = qw{Module::Install::Base};
+}
+
+sub install_share {
+	my ($self, $dir) = @_;
+
+	if ( ! defined $dir ) {
+		die "Cannot find the 'share' directory" unless -d 'share';
+		$dir = 'share';
+	}
+
+	$self->postamble(<<"END_MAKEFILE");
+config ::
+\t\$(NOECHO) \$(MOD_INSTALL) \\
+\t\t\"$dir\" \$(INST_AUTODIR)
+
+END_MAKEFILE
+
+	# The above appears to behave incorrectly when used with old versions
+	# of ExtUtils::Install (known-bad on RHEL 3, with 5.8.0)
+	# So when we need to install a share directory, make sure we add a
+	# dependency on a moderately new version of ExtUtils::MakeMaker.
+	$self->build_requires( 'ExtUtils::MakeMaker' => '6.11' );
+}
+
+1;
+
+__END__
+
+#line 98


More information about the Jifty-commit mailing list