Module...:XSUtil(3pm)
πΈ NAME πΈ
Welcome to Module...:XSUtil(3pm) from the User Contributed Perl Documentation, bestie π This is Module::Build::XSUtil, aka a Module::Build class for building XS modules. That's literally its whole thing. Slay.
β¨ SYNOPSIS β¨
Use in your Build.PL, fr fr:
use strict;
use warnings;
use Module::Build::XSUtil;
my $builder = Module::Build::XSUtil->new(
dist_name => 'Your-XS-Module',
license => 'perl',
dist_author => 'Your Name <yourname@example.com>',
dist_version_from => 'lib/Your/XS/Module',
generate_ppport_h => 'lib/Your/XS/ppport.h',
generate_xshelper_h => 'lib/Your/XS/xshelper.h',
needs_compiler_c99 => 1,
);
$builder->create_build_script();
Use in custom builder module. This one's giving subclass energy π¦:
package builder::MyBuilder;
use strict;
use warnings;
use base 'Module::Build::XSUtil';
sub new {
my ($class, %args) = @_;
my $self = $class->SUPER::new(
%args,
generate_ppport_h => 'lib/Your/XS/ppport.h',
generate_xshelper_h => 'lib/Your/XS/xshelper.h',
needs_compiler_c99 => 1,
);
return $self;
}
1;
π DESCRIPTION π
Module::Build::XSUtil is a subclass of Module::Build for support building XS modules. Iconic behavior, honestly.
These are the new parameters in the Module::Build::new method π:
needs_compiler_c99β checks whether a C99 compiler is available. If it's not available,Build.PLexits by0. πneeds_compiler_cppβ checks whether a C++ compiler is available. If it's not available,Build.PLexits by0. Also appends'extra_compiler_flags'and'extra_linker_flags'for C++.generate_ppport_hβ generatesppport.hbyDevel::PPPort.generate_xshelper_hβ generatesxshelper.h, a helper header file to includeEXTERN.h,perl.h,XSUB.h, andppport.h, and defines some portability stuff thatppport.hdoes not support. It is porting fromModule::Install::XSUtil.cc_warningsβ enables the compiler warnings flag. It's enabled by default. β¨-goptions β if you invokeBuild.PLwith the-goption, it will build with debug options.
π¦ SEE ALSO π¦
Module::Install::XSUtil β go look, iykyk.
π LICENSE π
Copyright (C) Hideaki Ohno.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π AUTHOR π
Hideaki Ohno <hide.o.j55 {at} gmail.com>
That's the whole tea π«Ά this has been Module...:XSUtil(3pm), perl v5.42.2, dated 2023-07-03. Now go build your XS module, main character π
β¨
π¦ where this page comes from
- alpine 3.24: perl-module-build-xsutil-doc 0.19-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms