view release on metacpan or search on metacpan
"File::chdir" => "0.1005",
"HTTP::Tiny" => "0.044",
"List::Util" => "1.45",
"Module::Build" => "0.4004",
"Path::Tiny" => "0.077",
"Shell::Config::Generate" => 0,
"Shell::Guess" => 0,
"Sort::Versions" => 0,
"Text::ParseWords" => "3.26",
"URI" => 0,
"parent" => 0,
"perl" => "5.008001"
},
"test_requires" => {
"Test2::V0" => "0.000121",
"URI::file" => 0,
"perl" => "5.008001"
}
);
"File::chdir" : "0.1005",
"HTTP::Tiny" : "0.044",
"List::Util" : "1.45",
"Module::Build" : "0.4004",
"Path::Tiny" : "0.077",
"Shell::Config::Generate" : "0",
"Shell::Guess" : "0",
"Sort::Versions" : "0",
"Text::ParseWords" : "3.26",
"URI" : "0",
"parent" : "0",
"perl" : "5.008001"
}
},
"test" : {
"requires" : {
"Test2::V0" : "0.000121",
"URI::file" : "0",
"perl" : "5.008001"
}
}
File::chdir: '0.1005'
HTTP::Tiny: '0.044'
List::Util: '1.45'
Module::Build: '0.4004'
Path::Tiny: '0.077'
Shell::Config::Generate: '0'
Shell::Guess: '0'
Sort::Versions: '0'
Text::ParseWords: '3.26'
URI: '0'
parent: '0'
perl: '5.008001'
resources:
IRC: irc://irc.perl.org/#native
bugtracker: https://github.com/PerlAlien/Alien-Base-ModuleBuild/issues
homepage: https://metacpan.org/pod/Alien::Base::ModuleBuild
repository: git://github.com/PerlAlien/Alien-Base-ModuleBuild.git
version: '1.17'
x_contributors:
- 'Joel A Berger <joel.a.berger@gmail.com>'
- 'Graham Ollis <plicease@cpan.org>'
This will return one of warn, digest, encrypt, digest_or_encrypt or
digest_and_encrypt. This is based on the ALIEN_DOWNLOAD_RULE
environment variable.
GUIDE TO DOCUMENTATION
The documentation for Module::Build is broken up into sections:
General Usage (Module::Build)
This is the landing document for Alien::Base::ModuleBuild's parent
class. It describes basic usage and background information. Its main
purpose is to assist the user who wants to learn how to invoke and
control Module::Build scripts at the command line.
It also lists the extra documentation for its use. Users and authors
of Alien:: modules should familiarize themselves with these
documents. Module::Build::API is of particular importance to authors.
Alien-Specific Usage (Alien::Base::ModuleBuild)
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
package Alien::Base::ModuleBuild;
use strict;
use warnings;
use 5.008001;
use parent 'Module::Build';
use Capture::Tiny 0.17 qw/capture tee/;
use File::chdir;
use File::Spec;
use File::Basename qw/fileparse/;
use Carp;
no warnings;
use Archive::Extract;
use warnings;
use Sort::Versions;
use List::Util qw( uniq any );
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
environment variable.
=head1 GUIDE TO DOCUMENTATION
The documentation for C<Module::Build> is broken up into sections:
=over
=item General Usage (L<Module::Build>)
This is the landing document for L<Alien::Base::ModuleBuild>'s parent class.
It describes basic usage and background information.
Its main purpose is to assist the user who wants to learn how to invoke
and control C<Module::Build> scripts at the command line.
It also lists the extra documentation for its use. Users and authors of Alien::
modules should familiarize themselves with these documents. L<Module::Build::API>
is of particular importance to authors.
=item Alien-Specific Usage (L<Alien::Base::ModuleBuild>)
lib/Alien/Base/ModuleBuild/Authoring.pod view on Meta::CPAN
Additional information can be gotten from the C<config> method.
=head3 Alien::Base for Run-Time Provision
C<Alien::MyLibrary> must be a subclass of L<Alien::Base>. This provides the C<import> method, which does the run-time provisioning so that when the XS file is loaded, it can find F<libmylibrary.so>. The C<import> method does this by pre-loading the l...
# file: Alien-MyLibrary/lib/Alien/MyLibrary.pm
package Alien::MyLibrary;
use parent 'Alien::Base';
1;
Finally, C<Alien::MyLibrary> must also be called by C<Some::Library::MyLibrary> before C<DynaLoader::bootstrap> or C<XSLoader::load>. The C<use> directive is recommended, however if you must use C<require> then be sure to call the C<import> method to...
# file: Some-Module-MyLibrary/lib/Some/Module/MyLibrary.pm
package Some::Module::MyLibrary;
use Alien::MyLibrary;
our $VERSION = '0.54';
lib/Alien/Base/ModuleBuild/FAQ.pod view on Meta::CPAN
=over 4
=item subclass L<Alien::Base::ModuleBuild> and implement C<alien_check_installed_version>
Create a subclass of L<Alien::Base::ModuleBuild> and put it in the C<inc> directory of your distribution so
that it can be used during install but won't I<be installed>.
# inc/My/ModuleBuild.pm
package My::ModuleBuild;
use parent 'Alien::Base::ModuleBuild';
sub alien_check_installed_version {
my($class) = @_;
# determine if your library is already provided by the system
my $version = ...;
# return false if the library is NOT provided by the system
return unless defined $version;
lib/Alien/Base/ModuleBuild/FAQ.pod view on Meta::CPAN
My::ModuleBuild->new(
...
)->create_build_script;
C<inc/My/ModuleBuild.pm>:
package My::ModuleBuild;
use strict;
use warnings;
use parent 'Alien::Base::ModuleBuild';
use Capture::Tiny qw( capture );
sub alien_check_installed_version
{
# see Alien::Base::ModuleBuild#alien_check_installed_version for details
my($self) = @_;
my($stdout, $stderr) = capture { system 'mytool', '--version' };
# return empty list if the tool is unavailable on the system,
lib/Alien/Base/ModuleBuild/FAQ.pod view on Meta::CPAN
As usual your C<Alien::MyTool> class will simply be a subclass of L<Alien::Base>.
If you tool is installed in a C<bin> directory, you are done, the default C<bin_dir>
implementation should work for you. Otherwise you may need to provide an alternate
implementation:
package Alien::MyTool;
use strict;
use warnings;
use parent 'Alien::Base';
sub bin_dir
{
# see Alien::Base#bin_dir for details
# You only need to override the default implementation if your tool
# does not install into the standard "bin" directory.
my($class) = @_;
# normally for system installs the tool should already be in your
lib/Alien/Base/ModuleBuild/FAQ.pod view on Meta::CPAN
A lot of libraries are bundled as tarballs with the version in the directory name
that they are extracted into, and the current directory when C<alien_check_built_version>
is called is the build root, so you can use C<File::chdir> as an easy way to determine
the version number:
package My::ModuleBuild;
use strict;
use warnings;
use parent 'Alien::Base::ModuleBuild';
use File::chdir; # provides @CWD
sub alien_check_built_version
{
my $dir_name = $CWD[-1];
if($dir_name =~ /^libfoo-([0-9\.]+)$/) {
return $1;
} else {
# Note that this will trigger a build failure
lib/Alien/Base/ModuleBuild/Repository/FTP.pm view on Meta::CPAN
package Alien::Base::ModuleBuild::Repository::FTP;
use strict;
use warnings;
use parent 'Alien::Base::ModuleBuild::Repository';
use Carp;
use Net::FTP;
# ABSTRACT: HTTP repository handler
our $VERSION = '1.17'; # VERSION
sub is_network_fetch { 1 }
sub is_secure_fetch { 0 }
sub connection {
lib/Alien/Base/ModuleBuild/Repository/HTTP.pm view on Meta::CPAN
package Alien::Base::ModuleBuild::Repository::HTTP;
use strict;
use warnings;
use Carp;
use HTTP::Tiny;
use Scalar::Util qw( blessed );
use URI;
use Alien::Base::ModuleBuild::Utils;
use parent 'Alien::Base::ModuleBuild::Repository';
# ABSTRACT: HTTP repository handler
our $VERSION = '1.17'; # VERSION
our $Has_HTML_Parser = eval { require HTML::LinkExtor; 1 };
sub is_network_fetch { 1 }
sub is_secure_fetch {
my($self) = @_;
lib/Alien/Base/ModuleBuild/Repository/Local.pm view on Meta::CPAN
package Alien::Base::ModuleBuild::Repository::Local;
use strict;
use warnings;
use Carp;
use File::chdir;
use File::Copy qw/copy/;
use Path::Tiny qw( path );
use parent 'Alien::Base::ModuleBuild::Repository';
# ABSTRACT: Local file repository handler
our $VERSION = '1.17'; # VERSION
sub is_network_fetch { 0 }
sub is_secure_fetch { 1 }
sub new {
my $class = shift;
lib/Alien/Base/ModuleBuild/Utils.pm view on Meta::CPAN
package Alien::Base::ModuleBuild::Utils;
use strict;
use warnings;
use Text::Balanced qw/extract_bracketed extract_delimited extract_multiple/;
use parent 'Exporter';
# ABSTRACT: Private utilities
our $VERSION = '1.17'; # VERSION
our @EXPORT_OK = qw/find_anchor_targets pattern_has_capture_groups/;
sub find_anchor_targets {
my $html = shift;
my @tags = extract_multiple(
t/00_diag.t view on Meta::CPAN
List::Util
Module::Build
Path::Tiny
Shell::Config::Generate
Shell::Guess
Sort::Versions
Test2::V0
Text::ParseWords
URI
URI::file
parent
);
my @modules = sort keys %modules;
sub spacer ()
{
diag '';
diag '';
t/alien_base_modulebuild_repository.t view on Meta::CPAN
}
};
done_testing;
package Alien::Base::ModuleBuild::Repository::Test;
use strict;
use warnings;
use parent 'Alien::Base::ModuleBuild::Repository';
sub is_network_fetch { $network_fetch }
sub is_secure_fetch { $secure_fetch }
sub list_files {
my $self = shift;
#files from GNU GSL FTP server, fetched 1/24/2012
my @files = ( qw/
gsl-1.0-gsl-1.1.patch.gz
gsl-1.0.tar.gz