Alien-Build
view release on metacpan or search on metacpan
method modifier, except that it wraps around the given hook instead of
a method. For example, this will add a probe system requirement:
$build->meta->around_hook(
probe => sub {
my $orig = shift;
my $build = shift;
my $type = $orig->($build, @_);
return $type unless $type eq 'system';
# also require a configuration file
if(-f '/etc/foo.conf')
{
return 'system';
}
else
{
return 'share';
}
},
);
after_hook
$build->meta->after_hook($hook_name, sub {
my(@args) = @_;
...
});
Execute the given code reference after the hook. The original arguments
are passed into the code reference.
before_hook
$build->meta->before_hook($hook_name, sub {
my(@args) = @_;
...
});
Execute the given code reference before the hook. The original
arguments are passed into the code reference.
apply_plugin
Alien::Build->meta->apply_plugin($name);
Alien::Build->meta->apply_plugin($name, @args);
Apply the given plugin with the given arguments.
ENVIRONMENT
Alien::Build responds to these environment variables:
ALIEN_BUILD_LOG
The default log class used. See Alien::Build::Log and
Alien::Build::Log::Default.
ALIEN_BUILD_PKG_CONFIG
Override the logic in Alien::Build::Plugin::PkgConfig::Negotiate
which chooses the best pkg-config plugin.
ALIEN_BUILD_POSTLOAD
semicolon separated list of plugins to automatically load after
parsing your alienfile.
ALIEN_BUILD_PRELOAD
semicolon separated list of plugins to automatically load before
parsing your alienfile.
ALIEN_BUILD_RC
Perl source file which can override some global defaults for
Alien::Build, by, for example, setting preload and postload plugins.
ALIEN_DOWNLOAD_RULE
This value determines the rules by which types of downloads are
allowed. The legal values listed under "download_rule", plus default
which will be the default for the current version of Alien::Build.
For this version that default is warn.
ALIEN_INSTALL_NETWORK
If set to true (the default), then network fetch will be allowed. If
set to false, then network fetch will not be allowed.
What constitutes a local vs. network fetch is determined based on the
start_url and local_source meta properties. An alienfile or plugin
could override this detection (possibly inappropriately), so this
variable is not a substitute for properly auditing of Perl modules
for environments that require that.
ALIEN_INSTALL_TYPE
If set to share or system, it will override the system detection
logic. If set to default, it will use the default setting for the
alienfile. The behavior of other values is undefined.
Although the recommended way for a consumer to use an Alien::Base
based Alien is to declare it as a static configure and build-time
dependency, some consumers may prefer to fallback on using an Alien
only when the consumer itself cannot detect the necessary package. In
some cases the consumer may want the user to opt-in to using an Alien
before requiring it.
To keep the interface consistent among Aliens, the consumer of the
fallback opt-in Alien may fallback on the Alien if the environment
variable ALIEN_INSTALL_TYPE is set to any value. The rationale is
that by setting this environment variable the user is aware that
Alien modules may be installed and have indicated consent. The actual
implementation of this, by its nature would have to be in the
consuming CPAN module.
DESTDIR
This environment variable will be manipulated during a destdir
install.
( run in 0.941 second using v1.01-cache-2.11-cpan-fa01517f264 )