1FFI::Probe(3) User Contributed Perl Documentation FFI::Probe(3)
2
3
4
6 FFI::Probe - System detection and probing for FFI extensions.
7
9 version 1.43
10
12 use FFI::Probe;
13
14 my $probe = FFI::Probe->new;
15 $probe->check_header('foo.h');
16 ...
17
19 This class provides an interface for probing for system capabilities.
20 It is used internally as part of the FFI::Platypus build process, but
21 it may also be useful for extensions that use Platypus as well.
22
24 new
25 my $probe = FFI::Probe->new(%args);
26
27 Creates a new instance.
28
29 log Path to a log or file handle to write to.
30
31 data_filename
32 Path to a file which will be used to store/cache results.
33
35 check_header
36 my $bool = $probe->check_header($header);
37
38 Checks that the given C header file is available. Stores the result,
39 and returns a true/false value.
40
41 check_cpp
42 check_eval
43 my $bool = $probe>check_eval(%args);
44
45 headers
46 Any additional headers.
47
48 decl
49 Any C declarations that need to be made before the "dlmain"
50 function.
51
52 stmt
53 Any C statements that should be made before the evaluation.
54
55 eval
56 Any evaluations that should be returned.
57
58 check
59 check_type_int
60 my $type = $probe->check_type_int($type);
61
62 check_type_enum
63 my $type = $probe->check_type_enum;
64
65 check_type_enum
66 my $type = $probe->check_type_enum;
67
68 check_type_float
69 my $type = $probe->check_type_float($type);
70
71 check_type_pointer
72 my $type = $probe->check_type_pointer;
73
74 set
75 $probe->set(@key, $value);
76
77 Used internally to store a value.
78
79 save
80 $probe->save;
81
82 Saves the values already detected.
83
84 data
85 my $data = $probe->data;
86
87 Returns a hashref of the data already detected.
88
89 log
90 $probe->log($string);
91
92 Sends the given string to the log.
93
94 log_code
95 $prbe->log_code($string);
96
97 Sends the given multi-line code block to the log.
98
99 template
100 my $template = $probe->template;
101
102 Returns the C code template used for "check_eval" and other "check_"
103 methods.
104
106 Author: Graham Ollis <plicease@cpan.org>
107
108 Contributors:
109
110 Bakkiaraj Murugesan (bakkiaraj)
111
112 Dylan Cali (calid)
113
114 pipcet
115
116 Zaki Mughal (zmughal)
117
118 Fitz Elliott (felliott)
119
120 Vickenty Fesunov (vyf)
121
122 Gregor Herrmann (gregoa)
123
124 Shlomi Fish (shlomif)
125
126 Damyan Ivanov
127
128 Ilya Pavlov (Ilya33)
129
130 Petr Pisar (ppisar)
131
132 Mohammad S Anwar (MANWAR)
133
134 Håkon Hægland (hakonhagland, HAKONH)
135
136 Meredith (merrilymeredith, MHOWARD)
137
138 Diab Jerius (DJERIUS)
139
140 Eric Brine (IKEGAMI)
141
142 szTheory
143
145 This software is copyright (c) 2015,2016,2017,2018,2019,2020 by Graham
146 Ollis.
147
148 This is free software; you can redistribute it and/or modify it under
149 the same terms as the Perl 5 programming language system itself.
150
151
152
153perl v5.32.1 2021-03-18 FFI::Probe(3)