1Module::Build::XSUtil(3U)ser Contributed Perl DocumentatiMoondule::Build::XSUtil(3)
2
3
4

NAME

6       Module::Build::XSUtil - A Module::Build class for building XS modules
7

SYNOPSIS

9       Use in your Build.PL
10
11           use strict;
12           use warnings;
13           use Module::Build::XSUtil;
14
15           my $builder = Module::Build::XSUtil->new(
16               dist_name            => 'Your-XS-Module',
17               license              => 'perl',
18               dist_author          => 'Your Name <yourname@example.com>',
19               dist_version_from    => 'lib/Your/XS/Module',
20               generate_ppport_h    => 'lib/Your/XS/ppport.h',
21               generate_xshelper_h  => 'lib/Your/XS/xshelper.h',
22               needs_compiler_c99   => 1,
23           );
24
25           $builder->create_build_script();
26
27       Use in custom builder module.
28
29           package builder::MyBuilder;
30           use strict;
31           use warnings;
32           use base 'Module::Build::XSUtil';
33
34           sub new {
35               my ($class, %args) = @_;
36               my $self = $class->SUPER::new(
37                   %args,
38                   generate_ppport_h    => 'lib/Your/XS/ppport.h',
39                   generate_xshelper_h  => 'lib/Your/XS/xshelper.h',
40                   needs_compiler_c99   => 1,
41               );
42               return $self;
43           }
44
45           1;
46

DESCRIPTION

48       Module::Build::XSUtil is subclass of Module::Build for support building
49       XS modules.
50
51       This is a list of a new parameters in the Module::Build::new method:
52
53       needs_compiler_c99
54           This option checks C99 compiler's availability. If it's not
55           available, Build.PL exits by 0.
56
57       needs_compiler_cpp
58           This option checks C++ compiler's availability. If it's not
59           available, Build.PL exits by 0.
60
61           In addition, append 'extra_compiler_flags' and 'extra_linker_flags'
62           for C++.
63
64       generate_ppport_h
65           Genereate ppport.h by Devel::PPPort.
66
67       generate_xshelper_h
68           Genereate xshelper.h which is a helper header file to include
69           EXTERN.h, perl.h, XSUB.h and ppport.h, and defines some portability
70           stuff which are not supported by ppport.h.
71
72           It is porting from Module::Install::XSUtil.
73
74       cc_warnings
75           Enable compiler warnings flag. It is enable by default.
76
77       -g options
78           If invoke Build.PL with '-g' option, It will build with debug
79           options.
80

SEE ALSO

82       Module::Install::XSUtil
83

LICENSE

85       Copyright (C) Hideaki Ohno.
86
87       This library is free software; you can redistribute it and/or modify it
88       under the same terms as Perl itself.
89

AUTHOR

91       Hideaki Ohno <hide.o.j55 {at} gmail.com>
92
93
94
95perl v5.36.0                      2022-07-22          Module::Build::XSUtil(3)
Impressum