```{index} single: FFI::Probe ``` # FFI::Probe System detection and probing for FFI extensions. ## VERSION version 2.12 ## SYNOPSIS ```perl use FFI::Probe; my $probe = FFI::Probe->new; $probe->check_header('foo.h'); ... ``` ## DESCRIPTION This class provides an interface for probing for system capabilities. It is used internally as part of the [FFI::Platypus](Platypus.md) build process, but it may also be useful for extensions that use Platypus as well. ## CONSTRUCTOR ### new ```perl my $probe = FFI::Probe->new(%args); ``` Creates a new instance. - log Path to a log or file handle to write to. - data\_filename Path to a file which will be used to store/cache results. ## METHODS ### check\_header ```perl my $bool = $probe->check_header($header); ``` Checks that the given C header file is available. Stores the result, and returns a true/false value. ### check\_cpp ### check\_eval ```perl my $bool = $probe>check_eval(%args); ``` - headers Any additional headers. - decl Any C declarations that need to be made before the `dlmain` function. - stmt Any C statements that should be made before the evaluation. - eval Any evaluations that should be returned. ### check ### check\_type\_int ```perl my $type = $probe->check_type_int($type); ``` ### check\_type\_enum ```perl my $type = $probe->check_type_enum; ``` ### check\_type\_enum ```perl my $type = $probe->check_type_enum; ``` ### check\_type\_float ```perl my $type = $probe->check_type_float($type); ``` ### check\_type\_pointer ```perl my $type = $probe->check_type_pointer; ``` ### set ```perl $probe->set(@key, $value); ``` Used internally to store a value. ### save ```perl $probe->save; ``` Saves the values already detected. ### data ```perl my $data = $probe->data; ``` Returns a hashref of the data already detected. ### log ```perl $probe->log($string); ``` Sends the given string to the log. ### log\_code ```perl $prbe->log_code($string); ``` Sends the given multi-line code block to the log. ### template ```perl my $template = $probe->template; ``` Returns the C code template used for `check_eval` and other `check_` methods. ## AUTHOR Author: Graham Ollis Contributors: Bakkiaraj Murugesan (bakkiaraj) Dylan Cali (calid) pipcet Zaki Mughal (zmughal) Fitz Elliott (felliott) Vickenty Fesunov (vyf) Gregor Herrmann (gregoa) Shlomi Fish (shlomif) Damyan Ivanov Ilya Pavlov (Ilya33) Petr Písař (ppisar) Mohammad S Anwar (MANWAR) Håkon Hægland (hakonhagland, HAKONH) Meredith (merrilymeredith, MHOWARD) Diab Jerius (DJERIUS) Eric Brine (IKEGAMI) szTheory José Joaquín Atria (JJATRIA) Pete Houston (openstrike, HOUSTON) Lukas Mai (MAUKE) ## COPYRIGHT AND LICENSE This software is copyright (c) 2015-2022 by Graham Ollis. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. ## Modules - [`FFI::Probe::Runner`](Probe/Runner.md) - Probe runner for FFI ```{toctree} :hidden: :maxdepth: 1 Probe/Runner ```