AAAA-Crypt-DH
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
inc/Devel/CheckLib.pm view on Meta::CPAN
result -- which is what you want if an external library dependency is not
available.
=head2 check_lib
This behaves exactly the same as C<assert_lib()> except that it is silent,
returning false instead of dieing, or true otherwise.
=cut
sub check_lib_or_exit {
eval 'assert_lib(@_)';
if($@) {
warn $@;
exit;
}
}
sub check_lib {
eval 'assert_lib(@_)';
return $@ ? 0 : 1;
}
# borrowed from Text::ParseWords
sub _parse_line {
my($delimiter, $keep, $line) = @_;
my($word, @pieces);
no warnings 'uninitialized'; # we will be testing undef strings
while (length($line)) {
# This pattern is optimised to be stack conservative on older perls.
# Do not refactor without being careful and testing it on very long strings.
# See Perl bug #42980 for an example of a stack busting input.
$line =~ s/^
inc/Module/Install.pm view on Meta::CPAN
$VERSION = '1.17';
# Storage for the pseudo-singleton
$MAIN = undef;
*inc::Module::Install::VERSION = *VERSION;
@inc::Module::Install::ISA = __PACKAGE__;
}
sub import {
my $class = shift;
my $self = $class->new(@_);
my $who = $self->_caller;
#-------------------------------------------------------------
# all of the following checks should be included in import(),
# to allow "eval 'require Module::Install; 1' to test
# installation of Module::Install. (RT #51267)
#-------------------------------------------------------------
inc/Module/Install/Can.pm view on Meta::CPAN
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.17';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
# check if we can load some module
### Upgrade this to not have to load the module if possible
sub can_use {
my ($self, $mod, $ver) = @_;
$mod =~ s{::|\\}{/}g;
$mod .= '.pm' unless $mod =~ /\.pm$/i;
my $pkg = $mod;
$pkg =~ s{/}{::}g;
$pkg =~ s{\.pm$}{}i;
local $@;
eval { require $mod; $pkg->VERSION($ver || 0); 1 };
}
# Check if we can run some command
sub can_run {
my ($self, $cmd) = @_;
my $_cmd = $cmd;
return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
next if $dir eq '';
require File::Spec;
my $abs = File::Spec->catfile($dir, $cmd);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
return;
}
# Can our C compiler environment build XS files
sub can_xs {
my $self = shift;
# Ensure we have the CBuilder module
$self->configure_requires( 'ExtUtils::CBuilder' => 0.27 );
# Do we have the configure_requires checker?
local $@;
eval "require ExtUtils::CBuilder;";
if ( $@ ) {
# They don't obey configure_requires, so it is
inc/Module/Install/CheckLib.pm view on Meta::CPAN
package Module::Install::CheckLib;
use strict;
use warnings;
use File::Spec;
use base qw(Module::Install::Base);
use vars qw($VERSION);
$VERSION = '0.12';
sub checklibs {
my $self = shift;
return unless scalar @_;
my %parms = @_;
unless (_author_side(delete $parms{run_checks_as_author})) {
require Devel::CheckLib;
Devel::CheckLib::check_lib_or_exit( %parms );
return;
}
}
sub assertlibs {
my $self = shift;
return unless scalar @_;
my %parms = @_;
unless (_author_side(delete $parms{run_checks_as_author})) {
require Devel::CheckLib;
Devel::CheckLib::assert_lib( %parms );
return;
}
}
sub _author_side {
my $run_checks_as_author = shift;
if ($Module::Install::AUTHOR) {
mkdir 'inc';
mkdir 'inc/Devel';
print "Extra directories created under inc/\n";
require Devel::CheckLib;
local $/ = undef;
open(CHECKLIBPM, $INC{'Devel/CheckLib.pm'}) ||
die("Can't read $INC{'Devel/CheckLib.pm'}: $!");
(my $checklibpm = <CHECKLIBPM>) =~ s/package Devel::CheckLib/package #\nDevel::CheckLib/;
inc/Module/Install/Fetch.pm view on Meta::CPAN
use strict;
use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.17';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
sub get_file {
my ($self, %args) = @_;
my ($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
$args{url} = $args{ftp_url}
or (warn("LWP support unavailable!\n"), return);
($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
}
inc/Module/Install/GithubMeta.pm view on Meta::CPAN
package Module::Install::GithubMeta;
use strict;
use warnings;
use Cwd;
use base qw(Module::Install::Base);
use vars qw($VERSION);
$VERSION = '0.30';
sub githubmeta {
my $self = shift;
return unless $Module::Install::AUTHOR;
return unless _under_git();
return unless $self->can_run('git');
my $remote = shift || 'origin';
local $ENV{LC_ALL}='C';
local $ENV{LANG}='C';
return unless my ($git_url) = `git remote show -n $remote` =~ /URL: (.*)$/m;
return unless $git_url =~ /github\.com/; # Not a Github repository
my $http_url = $git_url;
$git_url =~ s![\w\-]+\@([^:]+):!git://$1/!;
$http_url =~ s![\w\-]+\@([^:]+):!https://$1/!;
$http_url =~ s!\.git$!/!;
$self->repository( $git_url );
$self->homepage( $http_url ) unless $self->homepage();
return 1;
}
sub _under_git {
return 1 if -e '.git';
my $cwd = getcwd;
my $last = $cwd;
my $found = 0;
while (1) {
chdir '..' or last;
my $current = getcwd;
last if $last eq $current;
$last = $current;
if ( -e '.git' ) {
inc/Module/Install/Makefile.pm view on Meta::CPAN
use Module::Install::Base ();
use Fcntl qw/:flock :seek/;
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.17';
@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} ) {
inc/Module/Install/Win32.pm view on Meta::CPAN
use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.17';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
# determine if the user needs nmake, and download it if needed
sub check_nmake {
my $self = shift;
$self->load('can_run');
$self->load('get_file');
require Config;
return unless (
$^O eq 'MSWin32' and
$Config::Config{make} and
$Config::Config{make} =~ /^nmake\b/i and
! $self->can_run('nmake')
inc/Module/Install/WriteAll.pm view on Meta::CPAN
use strict;
use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '1.17';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
sub WriteAll {
my $self = shift;
my %args = (
meta => 1,
sign => 0,
inline => 0,
check_nmake => 1,
@_,
);
$self->sign(1) if $args{sign};
view all matches for this distributionview release on metacpan - search on metacpan
( run in 6.424 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-c30982ac1bc3 )