I have to write a perl module that will call functions in a C-library from my perl code and I wanted to understand if the following is possible:
- Can I pass a reference to a string and have the C-library fill it for me so that I can de-reference it on return and get the string?
- Can I construct and pass a pointer to a C-struct from my perl module and have it return the struct with values filled in?
- Can I pass a pointer to a function and have the C library call it
While I have been a long time perl user, I have never written perl module wrappers around functions in a C-library and any pointers, suggestions and advice would be sincerely appreciated.