Alien-Libarchive-Installer
view release on metacpan or search on metacpan
lib/Alien/Libarchive/Installer.pm view on Meta::CPAN
returned by the L<build_requires|Alien::Libarchive::Installer>
method.
Build and install libarchive into the given directory. If there
is an error an exception will be thrown. On a successful build, an
instance of L<Alien::Libarchive::Installer> will be returned.
These options may be passed into build_install:
=over 4
=item tar
Filename where the libarchive source tar is located.
If not specified the latest version will be downloaded
from the Internet.
=item dir
Empty directory to be used to extract the libarchive
source and to build from.
=item test
Specifies the test type that should be used to verify the integrity
of the build after it has been installed. Generally this should be
set according to the needs of your module. Should be one of:
=over 4
=item compile
use L<test_compile_run|Alien::Libarchive::Installer#test_compile_run> to verify.
This is the default.
=item ffi
use L<test_ffi|Alien::Libarchive::Installer#test_ffi> to verify
=item both
use both
L<test_compile_run|Alien::Libarchive::Installer#test_compile_run>
and
L<test_ffi|Alien::Libarchive::Installer#test_ffi>
to verify
=back
=back
=head1 ATTRIBUTES
Attributes of an L<Alien::Libarchive::Installer> provide the
information needed to use an existing libarchive (which may
either be provided by the system, or have just been built
using L<build_install|Alien::Libarchive::Installer#build_install>.
=head2 cflags
The compiler flags required to use libarchive.
=head2 libs
The linker flags and libraries required to use libarchive.
=head2 dlls
List of DLL or .so (or other dynamic library) files that can
be used by L<FFI::Raw> or similar.
=head2 version
The version of libarchive
=head1 INSTANCE METHODS
=head2 test_compile_run
if($installer->test_compile_run(%options))
{
# You have a working Alien::Libarchive as
# specified by %options
}
else
{
die $installer->error;
}
Tests the compiler to see if you can build and run
a simple libarchive program. On success it will
return the libarchive version. Other options include
=over 4
=item cbuilder
The L<ExtUtils::CBuilder> instance that you want
to use. If not specified, then a new one will
be created.
=item dir
Directory to use for building the executable.
If not specified, a temporary directory will be
created and removed when Perl terminates.
=item quiet
Passed into L<ExtUtils::CBuilder> if you do not
provide your own instance. The default is true
(unlike L<ExtUtils::CBuilder> itself).
=back
=head2 test_ffi
if($installer->test_ffi(%options))
{
# You have a working Alien::Libarchive as
# specified by %options
}
else
{
die $installer->error;
( run in 1.592 second using v1.01-cache-2.11-cpan-d7f47b0818f )