Take an NCI library definition file and turn it into a
An NCI library definition file provides the information needed to generate a parrot wrapper for the named library (or libraries). Its format is simple, and looks like:
[package] ncurses [lib] libform.so [defs] p new_field i i i i i i [lib] libncurses.so [defs] i is_term_resized i i
Note that the assembly file is generated in the order you specify, so if there are library dependencies, make sure you have them in the correct order.
Declares the package that all subsequent sub PMCs will be put into. The name is a simple concatenation of the package name, double colon, and the routine name, with no preceding punctuation.
The name of the library to be loaded. Should be as qualified as necessary for your platform--generally the full filename is required, though the directory generally isn't.
You may load multiple libraries here, but only the last one loaded will be exposed to subsequent defs.
This section holds the definitions of functions. Each function is assumed to be in the immediate preceeding library. The definition of the function is:
return_type name [param [param [param ...]]]
The param and return_type parameters use the NCI standard, which for reference is:
Parameter is a void pointer, taken from the PMC's data pointer. PMC is assumed to be an unmanagedstruct or child class.
Taken from a P register
Parameter is a character.
Taken from an I register
Parameter is a short
Parameter is an int
Parameter is a long
Paramter is a float
Taken from an N register.
Parameter is a double.
Paramter is a char *, presumably a C string
Taken from an S register
Void. Only valid as a return type, noting that the function returns no data.
Interpreter pointer. The current interpreter pointer is passed in
PMC.
Pointer to short.
Taken from an I register.
Pointer to int.
Pointer to long
3 POD Errors
The following errors were encountered while parsing the POD:
Expected text after =item, not a number
To install Ruby, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ruby
CPAN shell
perl -MCPAN -e shell install Ruby
For more information on module installation, please visit the detailed CPAN module installation guide.