Alien-Base-ModuleBuild
view release on metacpan or search on metacpan
The default implementation relies on pkg-config, and other heuristics,
but you will probably want to override this with your own
implementation if the package you are building does not use pkg-config.
When this method is called, the current working directory will be the
build root.
If you see an error message like this:
Library looks like it installed, but no version was determined
After the package is built from source code then you probably need to
provide an implementation for this method.
alien_extract_archive
[version 0.024]
my $dir = $amb->alien_extract_archive($filename);
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
unless (defined $version) {
local $CWD = $self->config_data( 'working_directory' );
$version = $self->alien_check_built_version
}
if (! $version && ! $pc_version) {
print STDERR "If you are the author of this Alien dist, you may need to provide a an\n";
print STDERR "alien_check_built_version method for your Alien::Base::ModuleBuild\n";
print STDERR "class. See:\n";
print STDERR "https://metacpan.org/pod/Alien::Base::ModuleBuild#alien_check_built_version\n";
carp "Library looks like it installed, but no version was determined";
$self->config_data( version => 0 );
return
}
if ( $version and $pc_version and versioncmp($version, $pc_version)) {
carp "Version information extracted from the file name and pkgconfig data disagree";
}
$self->config_data( version => $pc_version || $version );
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
The default implementation relies on C<pkg-config>, and other heuristics,
but you will probably want to override this with your own implementation
if the package you are building does not use C<pkg-config>.
When this method is called, the current working directory will be the
build root.
If you see an error message like this:
Library looks like it installed, but no version was determined
After the package is built from source code then you probably need to
provide an implementation for this method.
=head2 alien_extract_archive
[version 0.024]
my $dir = $amb->alien_extract_archive($filename);
t/alien_base_modulebuild.t view on Meta::CPAN
subtest 'install location' => sub {
local $CWD = _new_temp();
my $builder = builder();
my $path = $builder->alien_library_destination;
# this is not good enough, I really wish I could introspect File::ShareDir, then again, I wouldn't need this test!
my $path_to_share = "auto/share/dist/My-Test";
$path_to_share =~ s{\\}{/}g if $^O eq 'MSWin32';
like $path, qr/\Q$path_to_share\E/, 'path looks good';
};
subtest 'validation' => sub {
local $CWD = _new_temp();
my $builder = builder(
module_name => 'My::Test::Module',
dist_version => '1.234.567',
);
( run in 0.339 second using v1.01-cache-2.11-cpan-64827b87656 )