UV/ConfigBuilder.pm

filter: Statementstmt 100% 21 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 26 / 26 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« UV.pm ↑ Summary UV/Constant.build »
1 package SPVM::UV::ConfigBuilder;
2  
3 2 ▶use parent 'SPVM::Builder::ConfigBuilder';
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 31 ▶sub build_config {
Subroutine build_config: called CC=1 SCAR=0.0
Pod documented
9
10 31 my ($self) = @_;
11
12 31 my $config = SPVM::Builder::Config->new_c99;
13
14 31 $config->use_resource('Resource::UV');
15
16 31 my $resource_uv = $config->get_resource('Resource::UV');
17 31 $config->add_define(@{$resource_uv->config->defines});
18 31 $config->add_lib(@{$resource_uv->config->libs});
19
20 31 $config->use_resource('UV::Resource::UV');
21
22 31 $config->link_to('UV');
23
24 31 $config;
25 }
26  
27 2 1;
28  
29 =head1 Name
30  
31 SPVM::UV::ConfigBuilder - Config Builder for C<libuv>.
32  
33 =head1 Description
34  
35 SPVM::UV::ConfigBuilder class is a config builder for C<libuv>.
36  
37 This class is a Perl module.
38  
39 =head1 Usage
40  
41 my $config_builder = SPVM::UV::ConfigBuilder->new;
42
43 my $config = $config_builder->build_config;
44  
45 =head1 Class Methods
46  
47 =head2 new
48  
49 my $config_builder = SPVM::UV::ConfigBuilder->new;
50  
51 Create a new L<SPVM::UV::ConfigBuilder> object and returns it.
52  
53 =head1 Instance Methods
54  
55 =head2 build_config
56  
57 my $config = $config_builder->build_config;
58  
59 Builds L<SPVM::Builder::Config> object for C<libuv>, and returns it.
60  
61 =head1 See Also
62  
63 =over 2
64  
65 =item * L<SPVM::UV>
66  
67 =back
68  
69 =head1 Copyright & License
70  
71 Copyright (c) 2023 Yuki Kimoto
72  
73 MIT License
« UV.pm ↑ Summary UV/Constant.build »