daoswald edited this page Feb 23, 2012 · 2 revisions

Welcome to the Inline-CPP wiki!

Inline::CPP is a Perl module that subclasses Inline::C, leveraging Inline to enable the user to include C++ code directly within his or her Perl source. C++ classes become Perl classes. C++ functions become Perl functions.

It's a complicated topic, and I recommend some reading homework before trying to really use the module:

Primary importance:

  • Inline::CPP POD
  • Inline::C POD
  • Inline POD
  • Inline::C-Cookbook POD

Secondary importance (eventually you're going to end up here):

  • perldoc perlguts
  • perldoc perlxs
  • perldoc perlxstut
  • perldoc perlcall
  • perldoc perlapi

Other interesting resources:

  • Advanced Perl Programming (2nd Edition) (O'Reilly) contains a chapter on Inline::C
  • Writing Perl Modules for CPAN (an Apress book) contains a very good introduction to Inline::C
  • The Perl Cookbook (2nd Edition) contains several recipes that use Inline::C
  • My github repo "Inline-C-Talk"

Finally, check out the module Math::Prime::FastSieve for an example of a module that is based on Inline::CPP.