Manpage logo

Dist::Build::XS::WriteConstants - Dist::Build extension integrating ExtUtils::Constant

NAME  VERSION  SYNOPSIS  DESCRIPTION  AUTHOR  COPYRIGHT AND LICENSE 

NAME

Dist::Build::XS::WriteConstants − Dist::Build extension integrating ExtUtils::Constant

VERSION

version 0.022

SYNOPSIS

load_extension('Dist::Build::XS');
load_extension('Dist::Build::XS::WriteConstants');
add_xs(
module => 'Foo::Bar',
write_constants => {
NAMES => [ qw/FOO BAR BAZ/ ],
},
);

DESCRIPTION

This module is an extension of Dist::Build::XS, adding an additional argument to the "add_xs" function: "write_constants". This hash will take the same members as the "WriteConstants" function of ExtUtils::Constant, except that it will set sensible default values for the "NAME" (based on the module's name), "C_FILE" and "XS_FILE" (based on the XS file's directory and "CONST_BASENAME" defaulting to 'const') members so usually those will not need to be passed. So the above example is equivalent to

{
NAME => 'Foo::Bar',
NAMES => [ qw/FOO BAR BAZ/ ],
C_FILE => 'lib/Foo/const−c.inc',
XS_FILE => 'lib/Foo/const−xs.inc',
}

AUTHOR

Leon Timmermans <[email protected]>

COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Leon Timmermans.

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


Updated 2026-06-01 - jenkler.se | uex.se