blib/lib/SPVM/CallerInfo.pm untested

filter: Statementstmt n/a Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a SCAR -
1 package SPVM::CallerInfo;
2  
3 1;
4  
5 =head1 Name
6  
7 SPVM::CallerInfo - Information about a Caller
8  
9 =head1 Description
10  
11 L<CallerInfo|SPVM::CallerInfo> class in L<SPVM> represents information about a caller, such as the method absolute name, the file name, and the line number.
12  
13 =head1 Usage
14  
15 my $caller = CallerInfo->new;
16
17 # Setters
18 $caller->set_method_abs_name("Foo#bar");
19 $caller->set_file("Foo.spvm");
20 $caller->set_line(10);
21
22 # Getters
23 my $method_abs_name = $caller->method_abs_name;
24 my $file = $caller->file;
25 my $line = $caller->line;
26  
27 =head1 Details
28  
29 This class is automatically loaded.
30  
31 =head1 Fields
32  
33 =head2 method_abs_name
34  
35 C<has method_abs_name : rw string;>
36  
37 The absolute name of the method of the caller.
38  
39 Note that for native methods, this field may contain a C-level function name such as C<SPVM__Foo__bar>.
40  
41 =head2 file
42  
43 C<has file : rw string;>
44  
45 The file name where the caller is located.
46  
47 =head2 line
48  
49 C<has line : rw int;>
50  
51 The line number where the caller is located.
52  
53 =head1 Class Methods
54  
55 =head2 new
56  
57 C<static method new : L<CallerInfo|SPVM::CallerInfo> ();>
58  
59 Creates a new L<CallerInfo|SPVM::CallerInfo> object and returns it.
60  
61 =head1 Copyright & License
62  
63 Copyright (c) 2026 Yuki Kimoto
64  
65 MIT License