Alien-Xmake

 view release on metacpan or  search on metacpan

eg/alien_xrepo.pl  view on Meta::CPAN

use Affix;
my $sqlite3 = $repo->install('sqlite3');
affix $sqlite3->libpath, 'sqlite3_libversion', [], String;
say 'SQLite version: ' . sqlite3_libversion();

# Wrap a single function from libpng with FFI::Platypus
use FFI::Platypus;
my $lz4 = $repo->install('lz4');
my $ffi = FFI::Platypus->new;
$ffi->lib( $lz4->libpath );
$ffi->attach( 'LZ4_versionString', [] => 'string' );
say 'LZ4 version:    ' . LZ4_versionString();

lib/Alien/Xrepo.pod  view on Meta::CPAN

    use Affix;
    my $sqlite3 = $repo->install('sqlite3');
    affix $sqlite3->libpath, 'sqlite3_libversion', [], String;
    say 'SQLite version: ' . sqlite3_libversion();

    # Wrap a single function from libpng with FFI::Platypus
    use FFI::Platypus;
    my $lz4 = $repo->install('lz4');
    my $ffi = FFI::Platypus->new;
    $ffi->lib( $lz4->libpath );
    $ffi->attach( 'LZ4_versionString', [] => 'string' );
    say 'LZ4 version:    ' . LZ4_versionString();

=head1 DESCRIPTION

This module acts as an intelligent bridge between Perl and the C<xrepo> package manager.

While L<Affix> or L<FFI::Platypus> or L<Inline::C> can handle the binding or linking to native functions, Alien::Xrepo
handles the B<acquisition> of the libraries containing those functions. It automates the entire dependency lifecycle:

=over



( run in 1.576 second using v1.01-cache-2.11-cpan-e1769b4cff6 )