NAME

Alien::TinyCDB - Alien package for the TinyCDB library

VERSION

version 0.001

SYNOPSIS

use Alien::TinyCDB;
use ExtUtils::MakeMaker;

WriteMakefile(
    ...
    LIBS   => Alien::TinyCDB->libs,
    INC    => Alien::TinyCDB->cflags,
    ...
);

Or with FFI::Platypus:

use FFI::Platypus;
use Alien::TinyCDB;

my $ffi = FFI::Platypus->new( api => 1 );
$ffi->lib(Alien::TinyCDB->dynamic_libs);

DESCRIPTION

This module provides the TinyCDB library. TinyCDB is a small, fast and reliable utility and subroutine library for creating and reading constant databases. The database structure is tuned for fast reading.

TinyCDB is a public-domain implementation of Dan Bernstein's constant database (cdb) library. It creates and reads constant key-value databases with size up to 4GB. CDB files are immutable once created, making them ideal for fast lookups of data that doesn't change frequently.

This distribution uses Alien::Base to either detect a system-installed TinyCDB library or build and install it from source.

METHODS

This module inherits all methods from Alien::Base. The most commonly used are:

cflags

my $cflags = Alien::TinyCDB->cflags;

Returns the C compiler flags needed to compile against TinyCDB.

libs

my $libs = Alien::TinyCDB->libs;

Returns the linker flags needed to link against TinyCDB.

dynamic_libs

my @libs = Alien::TinyCDB->dynamic_libs;

Returns a list of dynamic library paths that can be used with FFI::Platypus.

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-alien-tinycdb/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudss.us>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.