Clownfish::Binding::Perl::Subroutine - Abstract base binding for a Clownfish::Function.
# Abstract base class.
This class is used to generate binding code for invoking Clownfish's functions and methods across the Perl/C barrier.
my $binding = $subclass->SUPER::new( param_list => $param_list, # required alias => 'pinch', # required class_name => 'Crustacean::Claw', # required retval_type => $type, # required use_labeled_params => 1, # default: false );
Abstract constructor.
param_list - A Clownfish::ParamList.
alias - The local, unqualified name for the Perl subroutine that will be used to invoke the function.
class_name - The name of the Perl class that the subroutine belongs to.
retval_type - The return value's Type.
use_labeled_params - True if the binding should take hash-style labeled parameters, false if it should take positional arguments.
Abstract method which must return C code (not XS code) defining the Perl XSUB.
Generate C code containing declarations for subroutine-specific automatic variables needed by the XSUB.
Accessors.
Returns the fully-qualified perl sub name.
Returns the fully-qualified name of the C function that implements the XSUB.
Returns a string containing the names of arguments to feed to bound C function, joined by commas.
Return Perl code initializing a package-global hash where all the keys are the names of labeled params. The hash's name consists of the the binding's perl_name() plus "_PARAMS".
Copyright 2008-2010 Marvin Humphrey
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install KSx::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm KSx::Simple
CPAN shell
perl -MCPAN -e shell install KSx::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.