Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Perl Module: Inline::CPP: Include C++ code inline within Perl code.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
grammar
lib/Inline
t
.gitignore
CPP.pm
Changes
MANIFEST
MANIFEST.SKIP
META.json
META.yml
Makefile.PL
README
TESTED

README

INTRODUCTION:

Inline::CPP -- Write Perl subroutines and classes in C++.

Inline::CPP lets you write Perl subroutines and classes in C++. You
don't have to learn XS or SWIG, you can just put code right "inline"
in your source.

Example:

   use Inline CPP => <<'END';

   class JAxH {
     public:
       JAxH(char *x);

       SV* data();
     private:
       SV *dat;
   };

   JAxH::JAxH(char *x) { dat = newSVpvf("Just Another %s Hacker", x); }
   SV* JAxH::data() { return dat; }

   END

   print JAxH->new('Inline')->data(), "\n";

When run, this complete program prints:

   Just Another Inline Hacker.

-----------------------------------------------------------------------------
FEATURES:

Inline::CPP version 0.33_010 is a dev. release.  It updates PREREQ_PM in
Makefile.PL to require Inline v0.49_02 to take advantage of a bugfix that
targets the Parse::RecDescent load failure bug.

The most recent stable release is 0.33.  Releases ending in _xxx are
experimental/developmental.

-----------------------------------------------------------------------------
INSTALLATION:

This module requires Inline::C.pm version 0.49 or higher to be installed.
It also uses Parse::RecDescent.

To install Inline::CPP do this:

perl Makefile.PL
make
make test
make install

(On ActivePerl for MSWin32, use nmake instead of make.)
(On Strawberry Perl you may use dmake instead.)

You have to 'make install' before you can run it successfully.
You will be prompted for what C++ compiler and library to use.  Accepting
the default should work in nearly every case (and if it doesn't, let me know).

*** A note about pre-requisites: Parse::RecDescent ***

Some smoke testers are reporting that the automated install tools such as
'cpan' and CPANPLUS are not properly installing the prerequisite
Parse::RecDescent.  If you see the Inline::CPP test suite failing with a
message about Parse::RecDescent, try installing that module first,
independently of Inline::CPP.  Then Inline::CPP should install cleanly as
documented above.


-----------------------------------------------------------------------------
INFORMATION:

- For more information on Inline::CPP see 'perldoc Inline::CPP'.
- For information about Inline.pm, see 'perldoc Inline'.
- For information about Inline::C (of which this is a subclass)
  see 'perldoc Inline::C', as well as 'perldoc Inline::C-Cookbook'.
- For information on using Perl with C or C++, see 'perldoc perlapi'

The Inline mailing list is inline@perl.org. Send mail to
inline-subscribe@perl.org to subscribe.

Please send questions and comments to "David Oswald" <DAVIDO@cpan.org>

Copyright (c) 2003, Neil Watkiss. All Rights Reserved.
Something went wrong with that request. Please try again.