Debian Codegraph @

lib/XS/Parse/Keyword/Builder_data.pm.PL

raw
1 # You may distribute under the terms of either the GNU General Public License
2 # or the Artistic License (the same terms as Perl itself)
3 #
4 # (C) Paul Evans, 2021 -- [email protected]
5
6 use v5.14;
7 use warnings;
8
9 use B qw( perlstring );
10 use Module::Build;
11
12 open my $outh, ">", $ARGV[0] or
13 die "Cannot write $ARGV[0] - $!\n";
14
15 local $/;
16
17 my $build = Module::Build->resume;
18
19 my @ccflags = @{ $build->notes( "builder_cflags" ) };
20 my $quoted_cflags = join ", ", map { perlstring $_ } @ccflags;
21
22 $outh->print( scalar do { <DATA> }
23 =~ s/__BUILDER_CFLAGS__/$quoted_cflags/r );
24
25 __DATA__
26 package XS::Parse::Keyword::Builder_data 0.49;
27
28 use v5.14;
29 use warnings;
30
31 # Additional CFLAGS arguments to pass during compilation
32 use constant BUILDER_CFLAGS => __BUILDER_CFLAGS__;
33
34 0x55AA;