Alien-Base-ModuleBuild
view release on metacpan or search on metacpan
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
my $dir = $amb->alien_extract_archive($filename);
This function unpacks the given archive and returns the directory
containing the unpacked files.
The default implementation relies on L<Archive::Extract> that is able
to handle most common formats. In order to handle other formats or
archives requiring some special treatment you may want to override
this method.
=head2 alien_do_system
[version 0.024]
my %result = $amb->alien_do_system($cmd)
Similar to
L<Module::Build's do_system|Module::Build::API/"do_system($cmd, @args)">,
also sets the path and several environment variables in accordance
to the object configuration (i.e. C<alien_bin_requires>) and
performs the interpolation of the patterns described in
L<Alien::Base::ModuleBuild::API/"COMMAND INTERPOLATION">.
Returns a set of key value pairs including C<stdout>, C<stderr>,
C<success> and C<command>.
=head2 alien_do_commands
$amb->alien_do_commands($phase);
Executes the commands for the given phase.
=head2 alien_interpolate
my $string = $amb->alien_interpolate($string);
Takes the input string and interpolates the results.
=head2 alien_install_network
[version 1.16]
my $bool = $amb->alien_install_network;
Returns true if downloading source from the internet is allowed. This
is true unless C<ALIEN_INSTALL_NETWORK> is defined and false.
=head2 alien_download_rule
[version 1.16]
my $rule = $amb->alien_download_rule;
This will return one of C<warn>, C<digest>, C<encrypt>, C<digest_or_encrypt>
or C<digest_and_encrypt>. This is based on the C<ALIEN_DOWNLOAD_RULE>
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>)
This is the document you are currently reading.
=item Authoring Reference (L<Alien::Base::Authoring>)
This document describes the structure and organization of
C<Alien::Base> based projects, beyond that contained in
C<Module::Build::Authoring>, and the relevant concepts needed by authors who are
writing F<Build.PL> scripts for a distribution or controlling
C<Alien::Base::ModuleBuild> processes programmatically.
Note that as it contains information both for the build and use phases of
L<Alien::Base> projects, it is located in the upper namespace.
=item API Reference (L<Alien::Base::ModuleBuild::API>)
This is a reference to the C<Alien::Base::ModuleBuild> API beyond that contained
in C<Module::Build::API>.
=item Using the resulting L<Alien> (L<Alien::Build::Manual::AlienUser>)
Once you have an L<Alien> you or your users can review this manual for how to use
it. Generally speaking you should have some useful usage information in your
L<Alien>'s POD, but some authors choose to direct their users to this manual
instead.
=item Using L<Alien::Build> instead (L<Alien::Build::Manual>)
As mentioned at the top, you are encouraged to use the L<Alien::Build> and
L<alienfile> system instead. This manual is a starting point for the other
L<Alien::Build> documentation.
=back
=head1 ENVIRONMENT
=over 4
=item B<ALIEN_ARCH>
Set to a true value to install to an arch-specific directory.
=item B<ALIEN_DOWNLOAD_RULE>
This controls security options for fetching alienized packages over the internet.
The legal values are:
=over 4
=item C<warn>
Warn if the package is either unencrypted or lacks a digest. This is currently
the default, but will change in the near future.
=item C<digest>
Fetch will not happen unless there is a digest for the alienized package.
=item C<encrypt>
Fetch will not happen unless via an encrypted protocol like C<https>, or if the
package is bundled with the L<Alien>.
=item C<digest_or_encrypt>
Fetch will only happen if the alienized package has a cryptographic signature digest,
or if an encrypted protocol like C<https> is used, or if the package is bundled with
the L<Alien>. This will be the default in the near future.
=item C<digest_and_encrypt>
Fetch will only happen if the alienized package has a cryptographic signature digest,
and is fetched via a secure protocol (like C<https>). Bundled packages are also
considered fetch via a secure protocol, but will still require a digest.
=back
=item B<ALIEN_FORCE>
Skips checking for an installed version and forces reinstalling the Alien target.
=item B<ALIEN_INSTALL_NETWORK>
If true (the default if not defined), then network installs will be allowed.
Set to C<0> or another false value to turn off network installs.
=item B<ALIEN_INSTALL_TYPE>
Set to C<share> or C<system> to override the install type. Set to C<default> or unset
to restore the default.
=item B<ALIEN_VERBOSE>
Enables verbose output from L<M::B::do_system|Module::Build#do_system>.
=item B<ALIEN_${MODULENAME}_REPO_${PROTOCOL}_${KEY}>
Overrides $KEY in the given module's repository configuration matching $PROTOCOL.
For example, C<ALIEN_OPENSSL_REPO_FTP_HOST=ftp.example.com>.
=back
=head1 SEE ALSO
=over
=item L<Alien::Build>
=item L<alienfile>
=item L<Alien::Build::Manual::AlienAuthor>
=item L<Alien>
=back
=head1 THANKS
Thanks also to
=over
=item Christian Walde (Mithaldu)
For productive conversations about component interoperability.
=item kmx
For writing Alien::Tidyp from which I drew many of my initial ideas.
=item David Mertens (run4flat)
For productive conversations about implementation.
( run in 0.724 second using v1.01-cache-2.11-cpan-39bf76dae61 )