blib/lib/SPVM/Builder/ObjectFileInfo.pm

filter: Statementstmt 77.4% 24 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 72.7% 8 / 11 Podpod 100% 4 / 4 totaltotal 78.2% 36 / 46 CC 1 SCAR 0.5
CC
1
Cov
77%
new
1.1
new
1.1
to_string
1.1
CRAP 1.0
« blib/lib/SPVM/Builder/Config/DLL.pm ↑ Summary blib/lib/SPVM/Address.pm »
1 package SPVM::Builder::ObjectFileInfo;
2  
3 770 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 770 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 770 ▶use Carp 'confess';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 770 ▶use SPVM::Builder::Accessor 'has';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 0 ▶use overload bool => sub {1}, '""' => sub { shift->to_string }, fallback => 1;
Subroutine BEGIN: called CC=1 SCAR=0.1
Subroutine __ANON__: not called CC=1 SCAR=0.1
Subroutine __ANON__: called CC=1 SCAR=0.1
10  
11 # Fields
12 770 has [qw(
13 file
14 compile_info
15 )];
16  
17 # Class methods
18 827 ▶sub new {
Subroutine new: called CC=1 SCAR=1.2
Pod documented
19 0 ▶ my $class = shift;
Subroutine new: not called CC=1 SCAR=1.2
Pod documented
20
21 0 my $self = {@_};
22
23 0 bless $self, $class;
24
25 0 return $self;
26 }
27  
28 # Instance methods
29 138248 ▶sub to_string {
Subroutine to_string: called CC=1 SCAR=1.2
Pod documented
30 0 ▶ my ($self) = @_;
Subroutine to_string: not called CC=1 SCAR=1.2
Pod documented
31
32 0 return $self->file;
33 }
34  
35 770 1;
36  
37 =head1 Name
38  
39 SPVM::Builder::ObjectFileInfo - Object File Information
40  
41 =head1 Description
42  
43 SPVM::Builder::ObjectFileInfo class manaiges an object file information.
44  
45 =head1 Fields
46  
47 =head2 file
48  
49 my $file = $object_file_info->file;
50 $object_file_info->file($file);
51  
52 Gets and sets the C<file> field, an object file name.
53  
54 =head2 compile_info
55  
56 my $compile_info = $object_file_info->compile_info;
57 $object_file_info->compile_info($compile_info);
58  
59 Gets and sets the C<compile_info> field, an L<SPVM::Builder::CompileInfo> object that contains the compilation information used to create this object file.
60  
61 =head1 Class Methods
62  
63 =head2 new
64  
65 my $object_file_info = SPVM::Builder::ObjectFileInfo->new(%fields);
66  
67 Creates a new L<SPVM::Builder::ObjectFileInfo> object, and returns it.
68  
69 =head1 Instance Methods
70  
71 =head2 to_string
72  
73 my $object_file_info = $object_file_info->to_string;
74  
75 Returns L</"file"> field.
76  
77 =head1 Operators
78  
79 Overloads the following operators.
80  
81 =head2 bool
82  
83 my $bool = !!$object_file_info;
84  
85 Always true.
86  
87 =head2 stringify
88  
89 my $object_file_name = "$object_file_info";
90  
91 Alias for L</"to_string"> method.
92  
93 =head1 Copyright & License
94  
95 Copyright (c) 2023 Yuki Kimoto
96  
97 MIT License
« blib/lib/SPVM/Builder/Config/DLL.pm ↑ Summary blib/lib/SPVM/Address.pm »