Dist::...nstants(3pm)
πΈ NAME πΈ
Dist::Build::XS::WriteConstants β Dist::Build extension integrating ExtUtils::Constant. This is the page for Dist::...nstants(3pm) under User Contributed Perl Documentation, bestie, and itβs giving very βsmall module, big constant energy.β π
β¨ VERSION β¨
version 0.028 β thatβs the version, periodt. π
π¦ 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 π
Okay so this module is an extension of Dist::Build::XS, and what it adds is one extra argument to the add_xs function: write_constants. That hash takes the same members as the WriteConstants function of ExtUtils::Constant, except it sets sensible default values for the NAME member (based on the moduleβs name), the C_FILE and XS_FILE members (based on the XS fileβs directory and CONST_BASENAME defaulting to 'const') β so usually those will not need to be passed. Lowkey convenient, highkey iconic. π«Ά
So the example up in the synopsis 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 <fawaka@gmail.com> β yes, thatβs the author, bestie. π
π 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. Slay, legal text, slay. π
Footer vibes: this is the Dist::...nstants(3pm) page, with perl v5.40.1 and date 2026-03-21. Thatβs the source/version and date, bestie β bye! π«Άβ¨
π¦ where this page comes from
- ubuntu stonking: libdist-build-perl 0.028-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms