blib/lib/SPVM/Native/API.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::Native::API;
2  
3  
4  
5 1;
6  
7 =head1 Name
8  
9 SPVM::Native::API - Native APIs
10  
11 =head1 Description
12  
13 The Native::API class in L<SPVM> has methods to call native APIs.
14  
15 =head1 Usage
16  
17 use Native::API;
18  
19 =head1 Fields
20  
21 =head2 env
22  
23 C<has env : L<Native::Env|SPVM::Native::Env>;>
24  
25 =head2 stack
26  
27 C<has stack : L<Native::Stack|SPVM::Native::Stack>;>
28  
29 =head1 Class Methods
30  
31 C<static method new : Native::API ($env : Native::Env, $stack : Native::Stack);>
32  
33 =head1 Instance Methods
34  
35 =head2 set_command_info_program_name
36  
37 C<method set_command_info_program_name : void ($program_name : string);>
38  
39 Copies the program name $program_name and sets the L<program_name|CommandInfo/"program_name"> class variable in C<CommandInfo> in this instance class to it.
40  
41 =head2 set_command_info_argv
42  
43 C<method set_command_info_argv : void ($argv : string[]);>
44  
45 Copies the command line arguments $argv and sets the L<argv|CommandInfo/"argv"> class variable in C<CommandInfo> class in this instance to it.
46  
47 =head2 set_command_info_basetime
48  
49 C<method set_command_info_basetime : void ($base_time : long);>
50  
51 Sets the L<base_time|CommandInfo/"base_time"> class variable in C<CommandInfo> class in this instance to the base time $base_time.
52  
53 =head2 call_init_methods
54  
55 C<method call_init_methods : void ();>
56  
57 Calls all L<INIT blocks|SPVM::Document::Language::Class/"INIT Block"> in this instance.
58  
59 =head2 destroy_class_vars
60  
61 C<method destroy_class_vars : void ();>
62  
63 Destroys all class variables in this instance.
64  
65 =head2 get_exception
66  
67 C<method get_exception : string ();>
68  
69 Gets the excetpion.
70  
71 =head2 set_exception
72  
73 C<method set_exception : void ($exception : string);>
74  
75 Sets an excetpion.
76  
77 =head1 Copyright & License
78  
79 Copyright (c) 2024 Yuki Kimoto
80  
81 MIT License
82