Find or build flex
From a Perl script
use Alien::flex;
use Env qw( @PATH );
unshift @PATH, Alien::flex->bin_dir; # flex is now in your pathIn an Alien::Build alienfile:
use alienfile;
share {
...
requires 'Alien::flex';
build [ '%{flex} ...' ];
...
};From Build.PL / Alien::Base::ModuleBuild:
use Alien:Base::ModuleBuild;
my $builder = Module::Build->new(
...
alien_bin_requires => [ 'Alien::flex' ],
...
);
$builder->create_build_script;This package can be used by other CPAN modules that require flex.
%{flex}
Returns the name of the flex command. Usually just flex.
Author: Graham Ollis plicease@cpan.org
Contributors:
Diab Jerius (DJERIUS)
This software is copyright (c) 2014-2022 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.