view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
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;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
$TestOnly = 1;
}
}
}
# overrides MakeMaker's prompt() to automatically accept the default choice
sub _prompt {
goto &ExtUtils::MakeMaker::prompt unless $AcceptDefault;
my ( $prompt, $default ) = @_;
my $y = ( $default =~ /^[Yy]/ );
print $prompt, ' [', ( $y ? 'Y' : 'y' ), '/', ( $y ? 'n' : 'N' ), '] ';
print "$default\n";
return $default;
}
# the workhorse
inc/Module/AutoInstall.pm view on Meta::CPAN
if (
!$SkipInstall
and (
$CheckOnly
or _prompt(
qq{==> Auto-install the }
. ( @required / 2 )
. ( $mandatory ? ' mandatory' : ' optional' )
. qq{ module(s) from CPAN?},
$default ? 'y' : 'n',
inc/Module/AutoInstall.pm view on Meta::CPAN
elsif ( !$SkipInstall
and $default
and $mandatory
and
_prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', )
=~ /^[Nn]/ )
{
push( @Missing, @required );
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
inc/Module/AutoInstall.pm view on Meta::CPAN
return
if defined( _version_check( _load($class), $ver ) ); # no need to upgrade
if (
_prompt( "==> A newer version of $class ($ver) is required. Install?",
'y' ) =~ /^[Nn]/
)
{
die "*** Please install $class $ver manually.\n";
}
inc/Module/AutoInstall.pm view on Meta::CPAN
# check if we're connected to some host, using inet_aton
sub _connected_to {
my $site = shift;
return (
( _load('Socket') and Socket::inet_aton($site) ) or _prompt(
qq(
*** Your host cannot resolve the domain name '$site', which
probably means the Internet connections are unavailable.
==> Should we try to install the required module(s) anyway?), 'n'
) =~ /^[Yy]/
inc/Module/AutoInstall.pm view on Meta::CPAN
*** You are not allowed to write to the directory '$path';
the installation may fail due to insufficient permissions.
.
if (
eval '$>' and lc(`sudo -V`) =~ /version/ and _prompt(
qq(
==> Should we try to re-execute the autoinstall process with 'sudo'?),
((-t STDIN) ? 'y' : 'n')
) =~ /^[Yy]/
)
inc/Module/AutoInstall.pm view on Meta::CPAN
print << ".";
*** The 'sudo' command exited with error! Resuming...
.
}
return _prompt(
qq(
==> Should we try to install the required module(s) anyway?), 'n'
) =~ /^[Yy]/;
}
view all matches for this distribution
view release on metacpan or search on metacpan
CODE_OF_CONDUCT.md view on Meta::CPAN
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
https://github.com/sanko/Net-BitTorrent.pm/discussions.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
unless (eval "use Module::Build::Compat 0.02; 1" ) {
print "This module requires Module::Build to install itself.\n";
require ExtUtils::MakeMaker;
my $yn = ExtUtils::MakeMaker::prompt
(' Install Module::Build now from CPAN?', 'y');
unless ($yn =~ /^y/i) {
die " *** Cannot install without Module::Build. Exiting ...\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
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;
view all matches for this distribution
view release on metacpan or search on metacpan
- O(1) insertion (`add`) per element
- O(1) random access (`get`)
- O(n) snapshot (`values`)
- Handles **any Perl scalar**: numbers, strings, refs, objects
- Evicted / cleared slots are set to `undef` so references are released promptly
- Minimal method call overhead and predictable behavior
## Install
### From CPAN
## Behavior notes
- Eviction policy is deterministic: **overwrite-oldest**
- Order is preserved at all times
- Slots are cleared on eviction and `clear()` to help free references promptly
- This module does **not** attempt to emulate Perl array semantics
## Development
### Run tests
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
use ExtUtils::MakeMaker ();
sub Makefile { $_[0] }
sub prompt {
shift;
goto &ExtUtils::MakeMaker::prompt;
}
sub makemaker_args {
my $self = shift;
my $args = ($self->{makemaker_args} ||= {});
view all matches for this distribution
view release on metacpan or search on metacpan
perl Build.PL
./Build
sudo ./Build install
To install in Windows, open a DOS prompt and type the following:
cpan
install Algorithm::TrunkClassifier
DEPENDENCIES
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Algorithm/VSM.pm view on Meta::CPAN
=head1 THANKS
Many thanks are owed to Shivani Rao and Bunyamin Sisman for sharing with me their
deep insights in IR. Version 1.4 was prompted by Zahn Bozanic's interest in
similarity matrix characterization of a corpus. Thanks, Zahn!
Several of the recent changes to the module are a result of the feedback I have
received from Naveen Kulkarni of Infosys Labs. Thanks, Naveen!
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
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
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
$AllDeps = 1;
}
}
}
# overrides MakeMaker's prompt() to automatically accept the default choice
sub _prompt {
goto &ExtUtils::MakeMaker::prompt unless $AcceptDefault;
my ( $prompt, $default ) = @_;
my $y = ( $default =~ /^[Yy]/ );
print $prompt, ' [', ( $y ? 'Y' : 'y' ), '/', ( $y ? 'n' : 'N' ), '] ';
print "$default\n";
return $default;
}
# the workhorse
inc/Module/AutoInstall.pm view on Meta::CPAN
map { +{@args}->{$_} }
grep { /^[^\-]/ or /^-core$/i } keys %{ +{@args} }
)[0]
);
# We want to know if we're under CPAN early to avoid prompting, but
# if we aren't going to try and install anything anyway then skip the
# check entirely since we don't want to have to load (and configure)
# an old CPAN just for a cosmetic message
$UnderCPAN = _check_lock(1) unless $SkipInstall || $InstallDepsTarget;
inc/Module/AutoInstall.pm view on Meta::CPAN
and (
$CheckOnly
or ($mandatory and $UnderCPAN)
or $AllDeps
or $InstallDepsTarget
or _prompt(
qq{==> Auto-install the }
. ( @required / 2 )
. ( $mandatory ? ' mandatory' : ' optional' )
. qq{ module(s) from CPAN?},
$default ? 'y' : 'n',
inc/Module/AutoInstall.pm view on Meta::CPAN
elsif ( !$SkipInstall
and $default
and $mandatory
and
_prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', )
=~ /^[Nn]/ )
{
push( @Missing, @required );
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
inc/Module/AutoInstall.pm view on Meta::CPAN
return
if _version_cmp( _version_of($class), $ver ) >= 0; # no need to upgrade
if (
_prompt( "==> A newer version of $class ($ver) is required. Install?",
'y' ) =~ /^[Nn]/
)
{
die "*** Please install $class $ver manually.\n";
}
inc/Module/AutoInstall.pm view on Meta::CPAN
# check if we're connected to some host, using inet_aton
sub _connected_to {
my $site = shift;
return (
( _load('Socket') and Socket::inet_aton($site) ) or _prompt(
qq(
*** Your host cannot resolve the domain name '$site', which
probably means the Internet connections are unavailable.
==> Should we try to install the required module(s) anyway?), 'n'
) =~ /^[Yy]/
inc/Module/AutoInstall.pm view on Meta::CPAN
*** You are not allowed to write to the directory '$path';
the installation may fail due to insufficient permissions.
.
if (
eval '$>' and lc(`sudo -V`) =~ /version/ and _prompt(
qq(
==> Should we try to re-execute the autoinstall process with 'sudo'?),
((-t STDIN) ? 'y' : 'n')
) =~ /^[Yy]/
)
inc/Module/AutoInstall.pm view on Meta::CPAN
print << ".";
*** The 'sudo' command exited with error! Resuming...
.
}
return _prompt(
qq(
==> Should we try to install the required module(s) anyway?), 'n'
) =~ /^[Yy]/;
}
view all matches for this distribution
view release on metacpan or search on metacpan
corpus/libpalindrome/config.guess view on Meta::CPAN
UNAME_PROCESSOR=powerpc
fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
# that puts up a graphical alert prompting to install
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
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;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
my ($self, $download, $build_src) = @_;
my $bp = $self->notes('build_params');
my $srcdir = catfile($build_src, $bp->{dirname});
my $unpack = 'y';
$unpack = $self->prompt("Dir '$srcdir' exists, wanna replace with clean sources?", "n") if (-d $srcdir);
if (lc($unpack) eq 'y') {
$self->clean_dir($srcdir);
my $archive = catfile($download, File::Fetch->new(uri => $bp->{url})->file);
print "Extracting sources...\n";
my $ae = Archive::Extract->new( archive => $archive );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Fetch/Prompt.pm view on Meta::CPAN
use strict;
use warnings;
use 5.010;
use Alien::Build::Plugin;
# ABSTRACT: Alien::Build plugin to prompt a user before making external download
our $VERSION = '0.61'; # VERSION
sub init
{
lib/Alien/Build/Plugin/Fetch/Prompt.pm view on Meta::CPAN
$meta->before_hook(
fetch => sub {
my($build, $url) = @_;
$url ||= $build->meta_prop->{start_url} || $build->meta_prop->{plugin_download_negotiate_default_url};
my $value = ExtUtils::MakeMaker::prompt("Downloading $url, is that okay?", $ENV{ALIEN_DOWNLOAD} || 'yes');
unless($value =~ /^(y|yes)$/i)
{
$build->log("User refussed to download $url");
# Do a hard exit. If the user insists, there isn't a way to recover really.
exit 2;
lib/Alien/Build/Plugin/Fetch/Prompt.pm view on Meta::CPAN
=encoding UTF-8
=head1 NAME
Alien::Build::Plugin::Fetch::Prompt - Alien::Build plugin to prompt a user before making external download
=head1 VERSION
version 0.61
lib/Alien/Build/Plugin/Fetch/Prompt.pm view on Meta::CPAN
preload 'Fetch::Prompt';
1;
=head1 DESCRIPTION
This plugin allows you to force L<Alien::Build> to prompt the user and ask for permission
before downloading anything from the internet. It uses the L<ExtUtils::MakeMaker> C<prompt>
function, so that it will do the sensible thing, like not infinitely halt install on
non-interactive installs. The default response is C<yes>, which is usually reasonable
(and the default if you do not use this plugin at all), but you may change this by using
the C<ALIEN_DOWNLOAD> environment variable (see below).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Build/Plugin/Fetch/PromptBeforeDownload.pm view on Meta::CPAN
use strict;
use warnings;
use Alien::Build::Plugin;
# ABSTRACT: Alien::Build plugin to prompt a user before making external download
our $VERSION = '0.57'; # VERSION
sub init
{
lib/Alien/Build/Plugin/Fetch/PromptBeforeDownload.pm view on Meta::CPAN
$meta->before_hook(
fetch => sub {
my($build, $url) = @_;
$url ||= $build->meta_prop->{plugin_download_negotiate_default_url};
my $value = ExtUtils::MakeMaker::prompt("Downloading $url, is that okay?", $ENV{ALIEN_DOWNLOAD} || 'yes');
unless($value =~ /^(y|yes)$/i)
{
$build->log("User refussed to download $url");
# Do a hard exit. If the user insists, there isn't a way to recover really.
exit 2;
lib/Alien/Build/Plugin/Fetch/PromptBeforeDownload.pm view on Meta::CPAN
=encoding UTF-8
=head1 NAME
Alien::Build::Plugin::Fetch::PromptBeforeDownload - Alien::Build plugin to prompt a user before making external download
=head1 VERSION
version 0.57
lib/Alien/Build/Plugin/Fetch/PromptBeforeDownload.pm view on Meta::CPAN
export ALIEN_BUILD_PRELOAD=Fetch::PromptBeforeDownload
=head1 DESCRIPTION
This plugin allows you to force L<Alien::Build> to prompt the user and ask for permission
before downloading anything from the internet. It uses the L<ExtUtils::MakeMaker> C<prompt>
function, so that it will do the sensible thing, like not infinitely halt install on
non-interactive installs. The default response is C<yes>, which is usually reasonable
(and the default if you do not use this plugin at all), but you may change this by using
the C<ALIEN_DOWNLOAD> environment variable (see below).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Alien/Build/rc.pm view on Meta::CPAN
=head1 DESCRIPTION
L<Alien::Build> will load your C<~/.alienbuild/rc.pl> file, if it exists
before running the L<alienfile> recipe. This allows you to alter the
behavior of L<Alien::Build> based L<Alien>s if you have local configuration
requirements. For example you can prompt before downloading remote content
or fetch from a local mirror.
=head1 FUNCTIONS
=head2 logx
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
my ($self, $download, $patches, $build_src) = @_;
my $bp = $self->notes('build_params');
my $srcdir = catfile($build_src, $bp->{dirname});
my $unpack = 'y';
$unpack = $self->prompt("Dir '$srcdir' exists, wanna replace with clean sources?", "n") if (-d $srcdir);
if (lc($unpack) eq 'y') {
$self->clean_dir($srcdir);
my $archive = catfile($download, File::Fetch->new(uri => $bp->{url})->file);
print "Extracting sources...\n";
my $ae = Archive::Extract->new( archive => $archive );
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
unless (eval "use Module::Build::Compat 0.02; 1" ) {
print "This module requires Module::Build to install itself.\n";
require ExtUtils::MakeMaker;
my $yn = ExtUtils::MakeMaker::prompt
(' Install Module::Build now from CPAN?', 'y');
unless ($yn =~ /^y/i) {
die " *** Cannot install without Module::Build. Exiting ...\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
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;
view all matches for this distribution
view release on metacpan or search on metacpan
src/Source/LibJPEG/install.txt view on Meta::CPAN
Win32 library, and application makefiles that build the sample applications
as Win32 console applications. (Even if you only want the library, we
recommend building the applications so that you can run the self-test.)
To use:
1. Open the command prompt, change to the main directory and execute the
command line
NMAKE /f makefile.vc setup-vc6
This will move jconfig.vc to jconfig.h and makefiles to project files.
(Note that the renaming is critical!)
2. Open the workspace file jpeg.dsw, build the library project.
src/Source/LibJPEG/install.txt view on Meta::CPAN
applications as Win32 console applications. (Even if you only want the
library, we recommend building the applications so that you can run the
self-test.)
To use:
1. Open the command prompt, change to the main directory and execute the
command line
NMAKE /f makefile.vc setup-v10
This will move jconfig.vc to jconfig.h and makefiles to project files.
(Note that the renaming is critical!)
2. Open the solution file jpeg.sln, build the library project.
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
unless (eval "use Module::Build::Compat 0.02; 1" ) {
print "This module requires Module::Build to install itself.\n";
require ExtUtils::MakeMaker;
my $yn = ExtUtils::MakeMaker::prompt
(' Install Module::Build now from CPAN?', 'y');
unless ($yn =~ /^y/i) {
die " *** Cannot install without Module::Build. Exiting ...\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
INC => $inst->{cflags},
});
}
else {
# some questions before we start
my $dbg = !$ENV{TRAVIS} ? $self->prompt("\nDo you want to see debug info + all messages during 'make' (y/n)?", 'n') : 'n';
$self->notes('build_msgs', lc($dbg) eq 'y' ? 1 : 0);
$self->notes('build_debug_info', lc($dbg) eq 'y' ? 1 : 0);
#my $large_imglib = $ENV{TRAVIS} ? 'y' : lc($self->prompt("Do you wanna compile built-in images with large (48x48) size? ", "y"));
my $large_imglib = 'y'; #forcing large icons
$self->notes('build_large_imglib', lc($large_imglib) eq 'y' ? 1 : 0);
# important directories
my $download = 'download';
inc/My/Builder.pm view on Meta::CPAN
$self->config_data('im_url', $self->notes('im_url'));
$self->config_data('cd_url', $self->notes('cd_url'));
# prepare sources
my $unpack;
$unpack = (-d "$build_src/iup") && !$ENV{TRAVIS} ? $self->prompt("\nDir '$build_src/iup' exists, wanna replace with clean sources?", "n") : 'y';
if (lc($unpack) eq 'y') {
File::Path::rmtree("$build_src/iup") if -d "$build_src/iup";
$self->prepare_sources($self->notes('iup_url'), $self->notes('iup_sha1'), $download, $build_src);
if ($self->notes('iup_patches')) {
$self->apply_patch("$build_src/iup", $_) foreach (@{$self->notes('iup_patches')});
}
}
$unpack = (-d "$build_src/im") && !$ENV{TRAVIS} ? $self->prompt("\nDir '$build_src/im' exists, wanna replace with clean sources?", "n") : 'y';
if (lc($unpack) eq 'y') {
File::Path::rmtree("$build_src/im") if -d "$build_src/im";
$self->prepare_sources($self->notes('im_url'), $self->notes('im_sha1'), $download, $build_src);
if ($self->notes('im_patches')) {
$self->apply_patch("$build_src/im", $_) foreach (@{$self->notes('im_patches')});
}
}
$unpack = (-d "$build_src/cd") && !$ENV{TRAVIS} ? $self->prompt("\nDir '$build_src/cd' exists, wanna replace with clean sources?", "n") : 'y';
if (lc($unpack) eq 'y') {
File::Path::rmtree("$build_src/cd") if -d "$build_src/cd";
$self->prepare_sources($self->notes('cd_url'), $self->notes('cd_sha1'), $download, $build_src);
if ($self->notes('cd_patches')) {
$self->apply_patch("$build_src/cd", $_) foreach (@{$self->notes('cd_patches')});
}
}
$unpack = (-d "$build_src/zlib") && !$ENV{TRAVIS} ? $self->prompt("\nDir '$build_src/zlib' exists, wanna replace with clean sources?", "n") : 'y';
if ($self->notes('zlib_url') && !$self->config_data('syszlib_lflags') && lc($unpack) eq 'y') {
File::Path::rmtree("$build_src/zlib") if -d "$build_src/zlib";
$self->prepare_sources($self->notes('zlib_url'), $self->notes('zlib_sha1'), $download, $build_src);
if ($self->notes('zlib_patches')) {
$self->apply_patch("$build_src/zlib", $_) foreach (@{$self->notes('zlib_patches')});
}
}
$unpack = (-d "$build_src/freetype") && !$ENV{TRAVIS} ? $self->prompt("\nDir '$build_src/freetype' exists, wanna replace with clean sources?", "n") : 'y';
if ($self->notes('freetype_url') && !$self->config_data('sysfreetype_lflags') && lc($unpack) eq 'y') {
File::Path::rmtree("$build_src/freetype") if -d "$build_src/freetype";
$self->prepare_sources($self->notes('freetype_url'), $self->notes('freetype_sha1'), $download, $build_src);
if ($self->notes('freetype_patches')) {
$self->apply_patch("$build_src/freetype", $_) foreach (@{$self->notes('freetype_patches')});
}
}
$unpack = (-d "$build_src/ftgl") && !$ENV{TRAVIS} ? $self->prompt("\nDir '$build_src/ftgl' exists, wanna replace with clean sources?", "n") : 'y';
if ($self->notes('ftgl_url') && lc($unpack) eq 'y') {
File::Path::rmtree("$build_src/ftgl") if -d "$build_src/ftgl";
$self->prepare_sources($self->notes('ftgl_url'), $self->notes('ftgl_sha1'), $download, $build_src);
if ($self->notes('ftgl_patches')) {
$self->apply_patch("$build_src/ftgl", $_) foreach (@{$self->notes('ftgl_patches')});
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Devel/CheckLib.pm view on Meta::CPAN
use Devel::CheckLib;
check_lib_or_exit( lib => 'jpeg', header => 'jpeglib.h' );
check_lib_or_exit( lib => [ 'iconv', 'jpeg' ] );
# or prompt for path to library and then do this:
check_lib_or_exit( lib => 'jpeg', libpath => $additional_path );
=head1 HOW IT WORKS
You pass named parameters to a function, describing to it how to build
inc/Devel/CheckLib.pm view on Meta::CPAN
=head2 check_lib_or_exit
This behaves exactly the same as C<assert_lib()> except that instead of
dieing, it warns (with exactly the same error message) and exits.
This is intended for use in Makefile.PL / Build.PL
when you might want to prompt the user for various paths and
things before checking that what they've told you is sane.
If any library or header is missing, it exits with an exit value of 0 to avoid
causing a CPAN Testers 'FAIL' report. CPAN Testers should ignore this
result -- which is what you want if an external library dependency is not
inc/Devel/CheckLib.pm view on Meta::CPAN
David Cantrell E<lt>david@cantrell.org.ukE<gt>
David Golden E<lt>dagolden@cpan.orgE<gt>
Thanks to the cpan-testers-discuss mailing list for prompting us to write it
in the first place;
to Chris Williams for help with Borland support.
=head1 COPYRIGHT and LICENCE
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
unless (eval "use Module::Build::Compat 0.02; 1" ) {
print "This module requires Module::Build to install itself.\n";
require ExtUtils::MakeMaker;
my $yn = ExtUtils::MakeMaker::prompt
(' Install Module::Build now from CPAN?', 'y');
unless ($yn =~ /^y/i) {
die " *** Cannot install without Module::Build. Exiting ...\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
It requires a C compiler and GNU make.
};
my $make_def = find_gnu_make();
my $make = $builder->prompt('Make program: ', $make_def );
$builder->notes('your_make', $make);
my $run_configure = 'y';
if ( -e 'src/judy-1.0.4/Makefile'
&& -e 'src/judy-1.0.4/config.h'
else {
$run_configure = $builder->y_n("Run Judy's configure now? ",'y');
}
if ( $run_configure ) {
my $configure_args = $builder->prompt(
'Pass any arguments to configure: ',
$builder->_default_config_args
);
$builder->notes("configure_args", $configure_args);
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Devel/CheckLib.pm view on Meta::CPAN
use Devel::CheckLib;
check_lib_or_exit( lib => 'jpeg', header => 'jpeglib.h' );
check_lib_or_exit( lib => [ 'iconv', 'jpeg' ] );
# or prompt for path to library and then do this:
check_lib_or_exit( lib => 'jpeg', libpath => $additional_path );
=head1 USING IT IN Makefile.PL or Build.PL
If you want to use this from Makefile.PL or Build.PL, do
inc/Devel/CheckLib.pm view on Meta::CPAN
=head2 check_lib_or_exit
This behaves exactly the same as C<assert_lib()> except that instead of
dieing, it warns (with exactly the same error message) and exits.
This is intended for use in Makefile.PL / Build.PL
when you might want to prompt the user for various paths and
things before checking that what they've told you is sane.
If any library or header is missing, it exits with an exit value of 0 to avoid
causing a CPAN Testers 'FAIL' report. CPAN Testers should ignore this
result -- which is what you want if an external library dependency is not
inc/Devel/CheckLib.pm view on Meta::CPAN
David Cantrell E<lt>david@cantrell.org.ukE<gt>
David Golden E<lt>dagolden@cpan.orgE<gt>
Thanks to the cpan-testers-discuss mailing list for prompting us to write it
in the first place;
to Chris Williams for help with Borland support.
=head1 COPYRIGHT and LICENCE
view all matches for this distribution
view release on metacpan or search on metacpan
$make = 'gmake';
warn 'your system is a BSD variant but gmake was not found'
if ($^O =~ /bsd$/);
}
}
$make = $builder->prompt('What is your system "make" command?', $make);
$builder->notes(make => $make);
# Figure out if we should do a full install
my $extra = $builder->y_n('libjio includes other files including Python ' .
view all matches for this distribution
view release on metacpan or search on metacpan
patch/Net-SSLeay.diff view on Meta::CPAN
+ },
+ );
+
+ }
if ( $self->prompt(
"Do you want to run external tests?\n".
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
unless (eval "use Module::Build::Compat 0.02; 1" ) {
print "This module requires Module::Build to install itself.\n";
require ExtUtils::MakeMaker;
my $yn = ExtUtils::MakeMaker::prompt
(' Install Module::Build now from CPAN?', 'y');
unless ($yn =~ /^y/i) {
die " *** Cannot install without Module::Build. Exiting ...\n";
}
view all matches for this distribution