in reply to Re^2: XS Modules - why and when?
in thread XS Modules - why and when?

Not directly, no. From perlxs:

XS is an interface description file format used to create an extension interface between Perl and C code (or a C library) which one wishes to use with Perl.

...

The glue code pulls the arguments from the Perl stack, converts these Perl values to the formats expected by a C function, calls this C function, and then transfers the return values of the C function back to Perl.

So XS is inextricably tied to C. That is not to say that you could not use XS via C as a conduit to access other, non-C code but it would be a bit Heath Robinson. Perhaps FFI::Platypus would be a better bet for that.

FTAOD, I am in no way an XS expert and can count on the fingers of one hand the number of times I have written such code so treat all this with a little scepticism.


🦛