FFI::Probe3pm
System detection and probing for ffi extensions.
Usage
use FFI::Probe;my $probe = FFI::Probe->new;$probe->check_header('foo.h');...
Version
version 2.10
Overview
This class provides an interface for probing for system capabilities. It is used internally as part of the FFI::Platypus build process, but it may also be useful for extensions that use Platypus as well.
Constructor
new
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
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
my $bool = $probe>check_eval(%args);
headers
|
Any additional headers. |
|---|---|
decl
|
Any C declarations that need to be made before the |
stmt
|
Any C statements that should be made before the evaluation. |
eval
|
Any evaluations that should be returned. |
check
check_type_int
my $type = $probe->check_type_int($type);
check_type_enum
my $type = $probe->check_type_enum;
check_type_enum
my $type = $probe->check_type_enum;
check_type_float
my $type = $probe->check_type_float($type);
check_type_pointer
my $type = $probe->check_type_pointer;
set
$probe->set(@key, $value);
Used internally to store a value.
save
$probe->save;
Saves the values already detected.
data
my $data = $probe->data;
Returns a hashref of the data already detected.
log
$probe->log($string);
Sends the given string to the log.
log_code
$prbe->log_code($string);
Sends the given multi-line code block to the log.
template
my $template = $probe->template;
Returns the C code template used for "check_eval" and other "check_" methods.
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.
Releases
4 releases since Debian 10 (Buster); the text changed 3 times.