Acme-Perl-Consensual
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
my $make = $Config::Config{make};
if ($InstallDepsTarget) {
print
"*** To install dependencies type '$make installdeps' or '$make installdeps_notest'.\n";
}
else {
print
"*** Dependencies will be installed the next time you type '$make'.\n";
}
# make an educated guess of whether we'll need root permission.
print " (You may need to do that as the 'root' user.)\n"
if eval '$>';
}
print "*** $class configuration finished.\n";
chdir $cwd;
# import to main::
no strict 'refs';
*{'main::WriteMakefile'} = \&Write if caller(0) eq 'main';
inc/Module/AutoInstall.pm view on Meta::CPAN
sub _has_cpanplus {
return (
$HasCPANPLUS = (
$INC{'CPANPLUS/Config.pm'}
or _load('CPANPLUS::Shell::Default')
)
);
}
# make guesses on whether we're under the CPAN installation directory
sub _under_cpan {
require Cwd;
require File::Spec;
my $cwd = File::Spec->canonpath( Cwd::cwd() );
my $cpan = File::Spec->canonpath( $CPAN::Config->{cpan_home} );
return ( index( $cwd, $cpan ) > -1 );
}
inc/Module/Install/Package.pm view on Meta::CPAN
my ($self) = @_;
}
sub _final {
my ($self) = @_;
}
1;
#-----------------------------------------------------------------------------#
# Take a guess at the primary .pm and .pod files for 'all_from', and friends.
# Put them in global magical vars in the main:: namespace.
#-----------------------------------------------------------------------------#
package Module::Package::PM;
use overload '""' => sub {
$_[0]->guess_pm unless @{$_[0]};
return $_[0]->[0];
};
sub set { $_[0]->[0] = $_[1] }
sub guess_pm {
my $pm = '';
my $self = shift;
if (-e 'META.yml') {
open META, 'META.yml' or die "Can't open 'META.yml' for input:\n$!";
my $meta = do { local $/; <META> };
close META;
$meta =~ /^module_name: (\S+)$/m
or die "Can't get module_name from META.yml";
$pm = $1;
$pm =~ s!::!/!g;
inc/Module/Install/Package.pm view on Meta::CPAN
require File::Find;
my @array = ();
File::Find::find(sub {
return unless /\.pm$/;
my $name = $File::Find::name;
my $num = ($name =~ s!/+!/!g);
my $ary = $array[$num] ||= [];
push @$ary, $name;
}, 'lib');
shift @array while @array and not defined $array[0];
die "Can't guess main module" unless @array;
(($pm) = sort @{$array[0]}) or
die "Can't guess main module";
}
my $pmc = $pm . 'c';
$pm = $pmc if -e $pmc;
$self->set($pm);
}
$main::PM = bless [$main::PM ? ($main::PM) : ()], __PACKAGE__;
package Module::Package::POD;
use overload '""' => sub {
return $_[0]->[0] if @{$_[0]};
( run in 0.222 second using v1.01-cache-2.11-cpan-bb97c1e446a )