Algorithm-Closest-NetworkAddress

 view release on metacpan or  search on metacpan

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

#line 1
package Module::Install::Makefile;

use strict 'vars';
use Module::Install::Base;
use ExtUtils::MakeMaker ();

use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
	$VERSION = '0.64';
	$ISCORE  = 1;
	@ISA     = qw{Module::Install::Base};
}

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, always use defaults
    if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
        local $ENV{PERL_MM_USE_DEFAULT} = 1;
        goto &ExtUtils::MakeMaker::prompt;
    } else {
        goto &ExtUtils::MakeMaker::prompt;
    }
}

sub makemaker_args {
    my $self = shift;
    my $args = ($self->{makemaker_args} ||= {});
    %$args = ( %$args, @_ ) if @_;
    $args;
}

# For mm args that take multiple space-seperated args,
# append an argument to the current list.
sub makemaker_append {
    my $self = shift;
    my $name = shift;
    my $args = $self->makemaker_args;
    $args->{name} = defined $args->{$name}
    	? join( ' ', $args->{name}, @_ )
    	: join( ' ', @_ );
}

sub build_subdirs {
    my $self    = shift;
    my $subdirs = $self->makemaker_args->{DIR} ||= [];
    for my $subdir (@_) {
        push @$subdirs, $subdir;
    }
}

sub clean_files {
    my $self  = shift;
    my $clean = $self->makemaker_args->{clean} ||= {};
    %$clean = (
        %$clean, 
        FILES => join(' ', grep length, $clean->{FILES}, @_),
    );
}

sub realclean_files {
    my $self  = shift;
    my $realclean = $self->makemaker_args->{realclean} ||= {};
    %$realclean = (
        %$realclean, 
        FILES => join(' ', grep length, $realclean->{FILES}, @_),
    );
}

sub libs {
    my $self = shift;
    my $libs = ref $_[0] ? shift : [ shift ];



( run in 1.524 second using v1.01-cache-2.11-cpan-39bf76dae61 )