Skip to content
Native libraries utilities for Perl6
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


The simple use in your module is:

use NativeLibs;
my $Lib; # To keep the reference

sub some_native_func() is native { * } # Note no library needed
… The rest of your module

    # Load the needed library
    without $Lib = NativeLibs::Loader.load('') {

If in your native library binding you need to support a range of versions:

use NativeLibs;

constant LIB =
    'mysqlclient', # The library short name
    'mysql_init',  # A 'well known symbol'
    16..20	       # range of supported versions

sub mysql_get_client_info(--> Str)       is export is native(LIB) { * }


This is a grow-up version of the original NativeLibs included in DBIish now released to allow the interested people the testing and discussion of the module.

Other examples in the drivers of

You can’t perform that action at this time.