develooper Front page | perl.beginners | Postings from December 2022

Re: providing perl api for C library

Thread Previous | Thread Next
December 10, 2022 13:09
Re: providing perl api for C library
Message ID:
On Sat, Dec 10, 2022 at 2:19 PM Henry R <> wrote:

> Hello list,
> I have written a C library which encrypts the data stored in object
> storage like S3.
> If I want to provide it with a perl OO interface what's the right way?
> such methods like:
> $data->encrypt("input.sth");
> $data->decrypt("input.sth");

I generally use Inline::C to access C libraries. (Take a look at the
Cookbook that ships with the Inline::C source distro and see what you

For something similar, but with a steeper learning curve and a few extra
complications, there's also XS (perldoc perlxs) - but I think Inline::C is
a good starting point from which you can migrate to XS if you so desire.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About