Acme-Perl-Consensual
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
256257258259260261262263264265266267268269270271272273274275276
my
$make
=
$Config::Config
{make};
if
(
$InstallDepsTarget
) {
"*** To install dependencies type '$make installdeps' or '$make installdeps_notest'.\n"
;
}
else
{
"*** Dependencies will be installed the next time you type '$make'.\n"
;
}
# make an educated guess of whether we'll need root permission.
" (You may need to do that as the 'root' user.)\n"
if
eval
'$>'
;
}
"*** $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
599600601602603604605606607608609610611612613614615616617618sub
_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 {
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
259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
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;
$_
[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
292293294295296297298299300301302303304305306307308309310311312313314
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;
return
$_
[0]->[0]
if
@{
$_
[0]};
( run in 0.309 second using v1.01-cache-2.11-cpan-cba739cd03b )