FFI::Platypus::Function - An FFI function object
version 0.82
use FFI::Platypus; # call directly my $ffi = FFI::Platypus->new; my $f = $ffi->function(puts => ['string'] => 'int'); $f->call("hello there"); # attach as xsub and call (faster for repeated calls) $f->attach('puts'); puts('hello there');
This class represents an unattached platypus function. For more context and better examples see FFI::Platypus.
my $ret = $f->call(@arguments); my $ret = $f->(@arguments);
Calls the function and returns the result. You can also use the function object like a code reference.
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)
This software is copyright (c) 2015,2016,2017,2018,2019 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.
To install FFI::Platypus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FFI::Platypus
CPAN shell
perl -MCPAN -e shell install FFI::Platypus
For more information on module installation, please visit the detailed CPAN module installation guide.