in reply to Calling a C++ subroutine from Perl

Inline::CPP should be pretty easy to get started with.

Internally, I believe it translates stuff to XS (Inline::C does anyway), so once you have a working solution, you can grab that code and use that as the basis for an XS version.

Replies are listed 'Best First'.
Re^2: Calling a C++ subroutine from Perl
by syphilis (Archbishop) on Mar 19, 2019 at 11:44 UTC
    Internally, I believe it translates stuff to XS

    Yep - it writes the XS file, compiles it and then executes the script.

    Cheers,
    Rob
      And caches the compilation so you don't have to recompile on every invocation of the script, as I read the doc. Pretty cool!