Alien-Base-ModuleBuild

 view release on metacpan or  search on metacpan

lib/Alien/Base/ModuleBuild/API.pod  view on Meta::CPAN


=item protocol

One of C<ftp>, C<http> C<https> or C<local>. The first three are obvious, C<local> allows packaging a tarball with the Alien:: module.

If your repository is going to need C<https>, make sure that you specify that, because it will inform L<Alien::Base::ModuleBuild> that you will need the prereqs for SSL (namely L<Net::SSLeay> and L<IO::Socket::SSL>).

=item protocol_class

Defines the protocol handler class. Defaults to 'Net::FTP' or 'HTTP::Tiny' as appropriate.

=item host

This is either the root server address for the FTP and HTTP classes (i.e. C<my.server.com>)

=item location

This key is protocol specific. For FTP this contains the name of the folder to search. For HTTP this is the page to be searched for links; this is specified as a path relative to the C<host>. For a local file, this specifies the folder containing the...

=item pattern

This is a C<qr> regex matching acceptable files found in the C<location>. If the pattern contains a capture group, the captured string is interpreted as the version number. N.B. if no versions are found, the files are sorted by filename using version...

=item exact_filename

This key may be specified in place of C<pattern> when the filename of the tarball is known, in which case such a file is downloaded from the given C<host> and C<location>. Note that, in general, specifying a C<pattern> gives more flexibility, but the...

=item exact_version

This key may be specified with the C<exact_filename> key when the version of the tarball is known.

=item platform

This attribute is a string telling the repository validator which platform the repository serves. This may be the string C<src> (the default) for platform-independent source files, or a string which matches the L<Module::Build> method C<os_type> (e.g...

=item c_compiler_required

If true (the default), then a C compiler is required to build from source.

=back

=item alien_repository_class

[version 0.001]

As the repositories in C<alien_repository> are converted to objects, this hash controls the type of object that is created. The keys are the relevant protocol. This allows for easy subclassing any or all protocol classes. The defaults are as follows.

 http    => 'Alien::Base::ModuleBuild::Repository::HTTP',
 ftp     => 'Alien::Base::ModuleBuild::Repository::FTP',
 local   => 'Alien::Base::ModuleBuild::Repository::Local',
 default => 'Alien::Base::ModuleBuild::Repository',

Unlike most L<Module::Build> parameters, authors may specify only those keys which are to be overridden. If any of the above keys are not specified, the above defaults will be used.

=item alien_repository_default

[version 0.001]

This property is a shortcut for specifying multiple repositories with similar attributes. If a repository attribute is not defined in its C<alien_repository> hashref, but that attribute is defined here, then this value will be used. This hashref is e...

=item alien_selection_method

[not yet implemented]

This is intended to choose the mechanism for selecting one file from many. The default name is C<newest>.

=item alien_share_dir

[version 0.001]

The name of the folder which will both serve a stub share directory via L<Module::Build>'s C<share_dir>/C<dist_dir> parameter. This directory is added in a smart manner which attempts not to interfere with other author-defined C<share_dir>s. The defa...

=item alien_stage_install

It might be tempting to use this option if you have a library or tool that hard codes paths from the install location inside the
executable or library code.  However, using this option relies on blib detection which is not very reliable, and can leave your
install in an broken state if the package install step fails.  If you really need this option, please consider instead migrating
to L<Alien::Build>, which has a much more reliable way of staging installs correctly.

[version 0.016]

Alien packages are installed directly into the blib directory by the `./Build' command rather than to the final location during the `./Build install` step.

[version 0.017]

As of 0.017 this is the default.

=item alien_temp_dir

[version 0.001]

The name of the temporary folder which will house the library when it is downloaded and built. The default name is C<_alien>.

=item alien_test_commands

[version 0.001]

An arrayref of commands used to test the library.  Each command is first
passed through the L<command interpolation engine|/"COMMAND INTERPOLATION">,
so those variables may be used.  The default is to do no tests.  The most
common command used by the GNU toolchain is C<[ 'make check' ]>, but beware
that is not supported by all packages.

[version 0.009]

Each command may be either a string or an array reference.  If the array
reference form is used, then the multiple argument form of system is used.

=item alien_version_check

[version 0.001]

A command to run to check the version of the library installed on the system. The default is C<pkg-config --modversion %n>.

=back

=head2 PACKAGE AND ENVIRONMENT VARIABLES

A few global variables are used to set gross behavior. For each pair of variables, if both are set, the environment variable takes precedence.

=over

=item $ENV{ALIEN_ARCH}

[version 0.017]



( run in 0.397 second using v1.01-cache-2.11-cpan-acebb50784d )