FFI::Probe(3pm)

🌸 NAME 🌸

okay bestie, welcome to FFI::Probe(3pm) β€” the FFI::Probe page from the User Contributed Perl Documentation. This is system detection and probing for FFI extensions. That's the name, that's the vibe. πŸ’…

✨ VERSION ✨

It's version 2.11, no cap. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

use FFI::Probe;

my $probe = FFI::Probe->new;
$probe->check_header('foo.h');
...

Make a probe, check a header, keep going. Literally the whole little movie. ✨

🌈 DESCRIPTION 🌈

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.

So yes, it's giving build-process main character energy, but it's also here for extension besties. 🫢

πŸ› οΈ CONSTRUCTOR πŸ› οΈ

new

my $probe = FFI::Probe->new(%args);

Creates a new instance. Bestie, here are the args:

  • 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

Listed here with no extra signature or description in the original β€” just the method name, living its best life. 🫢

check_eval

my $bool = $probe>check_eval(%args);
yes, that > is exactly how it appears in the original β€” not me being cute with syntax. Keeping it character for character. πŸ’…
  • 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

Listed with no extra details in the original, just vibing as a method name. ✨

check_type_int

my $type = $probe->check_type_int($type);

No extra prose in the original β€” just the signature, and I'm keeping it that way. πŸŽ€

check_type_enum

my $type = $probe->check_type_enum;

okay yes, check_type_enum appears twice in the original β€” keeping both, periodt. πŸ’…

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.

yes, $prbe is exactly what the original says. Not touching it β€” code stays exact. 🧚

template

my $template = $probe->template;

Returns the C code template used for check_eval and other check_ methods.

πŸ‘‘ AUTHOR πŸ‘‘

Author: Graham Ollis <plicease@cpan.org>

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)

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.


mwah πŸ’‹ this FFI::Probe(3pm) page is from perl v5.42.3, dated 2026-08-20 β€” go probe something iconic, bestie 🫢

πŸ“¦ where this page comes from