The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Alien::Lua - Alien module for asserting a liblua is available

SYNOPSIS

use Alien::Lua;
my $alien = Alien::Lua->new;
my $libs = $alien->libs;
my $cflags = $alien->cflags;

DESCRIPTION

See the documentation of Alien::Base for details on the API of this module.

This module builds a copy of Lua that it ships or picks up a liblua from the system. It exposes the location of the installed headers and shared objects via a simple API to use by downstream depenent modules.

Using LuaJIT

If you have Alien::LuaJIT installed, you can pass the luajit option to the constructor to make Alien::Lua act as a shim for Alien::LuaJIT:

use Alien::Lua;
my $alien = Alien::Lua->new(luajit => 1);
my $libs = $alien->libs; # refers to luajit
my $cflags = $alien->cflags; # refers to luajit

Note that if Alien::LuaJIT is not available, the luajit option becomes a silent no-op.

After passing the luajit option to the constructor, you can check whether LuaJIT will be used with the luajit method of Alien::Lua.

ADDITIONAL METHODS

luajit

Returns the Alien::LuaJIT object used by the given instance, if any (see above).

SEE ALSO

http://www.lua.org

http://www.luajit.org

Alien::LuaJIT

Alien::Base

AUTHOR

Steffen Mueller, <smueller@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2013 by Steffen Mueller

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available.