- Amount Requested:
Develop a powerful Foreign Function Interface for Perl 5, similar to Python's ctypes.
Benefits to the Perl Community
ctypes provides a very handy way to call hard-coded subroutines in shared libraries, but only for Python. Having a similar module for Perl will benefit Perl 5 programmers who will be able to call subroutines in C and similar compiled languages from their Perl programs easily and dynamically.
A CPAN module which will give Perl 5 programmers similar functionality to Python's ctypes. ctypes is licensed under the MIT/X11 Licence ( http://en.wikipedia.org/wiki/MIT_License ) and we hope to preserve that licence for all the code derived from ctypes, and for the original code. Licensing the code under the MIT/X11 Licence will give its users and developers the most flexibility, and will make the end-result compatible with Parrot, Apache and other projects.
ctypes ( http://python.net/crew/theller/ctypes/ ) is an advanced Foreign Function Interface (FFI) for Python. ctypes allows programmers to call native functions (in C, C++, etc.) from high-level code at run-time, without needing compilation, and without the need to be familiar with the high-level virtual machine's internals. This is as opposed to Perl's XS or Inline::C.
This proposed project aims to deliver a ctypes-like API for Perl which will provide similar capabilities.
chromatic mentioned a ctypes-like API in his "Five Features Perl 5 Needs Now" article:
- Studying the ctypes API (1 week or less)
- Studying the ctypes internals (2 weeks)
- Designing an equivalent Perl 5 API (1 week)
- Porting ctypes to Perl/XS (4 weeks or more)
The project will take 2-3 months. I can begin working on it immediately.
I am an active user, developer, and advocate of Perl and other open-source technologies. I maintain many modules on CPAN (http://search.cpan.org/~shlomif/), and have contributed to other Perl projects. I am also proficient in C, C++, Assembly and other languages and have been actively involved in C and C++ projects.
I have successfully completed the Perl Foundation's "XML-RSS Cleanup" grant:
( short URL: http://is.gd/1nYZM )
I maintain an active homepage at http://www.shlomifish.org/ which contains more information about me.