Skip to content

rurban/Ctypes

Repository files navigation

Ctypes

Call and wrap native C functions and libraries from Perl, using only
Perl.

Ctypes (current v0.003) is based on libffi to provide a way of calling
native C library functions directly from Perl, using only Perl, and
hence not requiring a compiler.

Of course, the Ctypes module itself is written with XS, so you need 
a compiler to install this module from source.
Orperhaps (wonder of wonders) it could someday be rolled into Perl5 core?

This module requires the C library libffi to run. If you're on a POSIX
system, libffi should have been installed this via your favoured package
manager, otherwise we will build and install it for you into /usr/local. 
If you're on Win32 there are pre-compiled libffi binaries included.

http://sourceware.org/libffi/

INSTALLATION

This module uses ExtUtils::ModuleMaker because I couldn't see how to
get Module::Build to compile stuff the way I wanted. Module::Install
is currently still a bit limited for this fancy stuff too. So what
you do is:

	perl Makefile.PL [INCDIR=libffi-include-path LIBDIR=libffi-lib-path]
	make
	make test
	make install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

    perldoc Ctypes

You can also look for information at:

    RT, CPAN's request tracker
        http://rt.cpan.org/NoAuth/Bugs.html?Dist=Ctypes

    AnnoCPAN, Annotated CPAN documentation
        http://annocpan.org/dist/Ctypes

    CPAN Ratings
        http://cpanratings.perl.org/d/Ctypes

    Search CPAN
        http://search.cpan.org/dist/Ctypes/


LICENSE AND COPYRIGHT

Copyright (c) 2010 Ryan Jendoubi

This program is free software; you can redistribute it and/or modify it
under the terms of the Artistic License 2.0. 
See http://www.opensource.org/licenses/artistic-license-2.0.php for
more information.

Some code has been copied or adapted whole or in part from Python 2.7
source code. Those sections of code are Copyright (c) 2001, 2002, 2003,
2004, 2005, 2006 Python Software Foundation; All Rights Reserved, and
released under the Python Software Foundation License Verion 2. See the
LICENSES document for more details.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •