http://www.perlmonks.org?node_id=994434


in reply to Re: Calling C++ functions from Perl without using xsubpp
in thread Calling C++ functions from Perl without using xsubpp

Inline::C and Co. provide automatic conversion to some set of common types, just like XS does. If using these types is enough, then you don't need anything else but those modules. If you have to work with more complex data structures, then you have to .... learn how to work with XS.

Perhaps I've misread (and inappropriately edited) that excerpt from your post, but it seems to me that you're saying that Inline::C is good only for some limited set of C types.
That's not the case - if it can be done using XS then it can be done using Inline::C. After all, Inline::C is little more than a utility that generates an XS file, which it then compiles.
(I keep thinking there must be *some* feature of XS that Inline::C can't reproduce ... and I'd love to see some examples that validate such thinking.)

Cheers,
Rob
  • Comment on Re^2: Calling C++ functions from Perl without using xsubpp

Replies are listed 'Best First'.
Re^3: Calling C++ functions from Perl without using xsubpp
by andal (Hermit) on Sep 20, 2012 at 06:56 UTC

    Well, I guess I have expressed myself imprecise. My point was not so much about abilities of Inline::C. My point was about need to learn perl guts if one needs to work with more complex input/output parameters. In this case learning XS comes in mostly for understanding what is happening. Though, probably some people can write code without knowing how their code turns into program :)

      My point was about need to learn perl guts if one needs to work with more complex input/output parameters

      Yes, that is so ... and I probably should have realised that was what you were saying.

      Cheers,
      Rob