AnyMQ

 view release on metacpan or  search on metacpan

inc/Module/Install/Any/Moose.pm  view on Meta::CPAN

        # ripped out of ExtUtils::MakeMaker
        my $file = "$module.pm";
        $file =~ s{::}{/}g;
        eval { require $file };

        my $pr_version = $module->VERSION || 0;
        $pr_version =~ s/(\d+)\.(\d+)_(\d+)/$1.$2$3/;

        if ($@) {
            print "missing\n";
            my $y_n = ExtUtils::MakeMaker::prompt("  Add $module to the prerequisites?", 'n');
            if ($y_n =~ /^y(?:es)?$/i) {
                $self->requires($module, $version);
            } else {
                $self->recommends($module, $version);
            }
        } else {
            print "loaded ($pr_version)\n";
            $self->recommends($module, $version);
        }
    }

inc/Module/Install/Makefile.pm  view on Meta::CPAN

BEGIN {
	$VERSION = '1.06';
	@ISA     = 'Module::Install::Base';
	$ISCORE  = 1;
}

sub Makefile { $_[0] }

my %seen = ();

sub prompt {
	shift;

	# Infinite loop protection
	my @c = caller();
	if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
		die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
	}

	# In automated testing or non-interactive session, always use defaults
	if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
		local $ENV{PERL_MM_USE_DEFAULT} = 1;
		goto &ExtUtils::MakeMaker::prompt;
	} else {
		goto &ExtUtils::MakeMaker::prompt;
	}
}

# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
# ways based on the MM version.
my $makemaker = eval $ExtUtils::MakeMaker::VERSION;

# If we are passed a param, do a "newer than" comparison.
# Otherwise, just return the MakeMaker version.



( run in 1.725 second using v1.01-cache-2.11-cpan-6aa56a78535 )