Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

New recipe for the Inline::C Cookbook #56

rongrw opened this Issue Dec 17, 2016 · 17 comments


None yet
5 participants

rongrw commented Dec 17, 2016

Hi all,

Following a recent discussion on the Inline mailing list about accessing Perl variables directly from a C function, I've put together some sample code that I think would be appropriate to add into the Inline::C Cookbook. I've attached a file in plain text format that contains the full recipe.

Would it be possible to add this new recipe into the Cookbook, perhaps under the "Meat & Potatoes" chapter?

Kind Regards,



mohawk2 commented Jan 15, 2017

Hi Ron, this will probably be easier for the maintainers to process if you actually make a pull request with this?


wbraswell commented Jan 16, 2017

Good job on the new cookbook entry! 👍
I agree with @mohawk2, you should make a pull request.


rongrw commented Jan 16, 2017

I've noticed that the Cookbook is in (.swim) format in the master branch. Sorry for asking these simple questions, but what is the (.swim) format and how do I convert it to (.pod) to ensure the formatting looks correct?

I'm assuming that I would have to add my new recipe into Cookbook.swim in order to create a pull request.

Thank you.


mohawk2 commented Jan 16, 2017

That's a great question! As I recall, you have to install Zilla::Dist and do (I think) zild dist to make a .pm file you could inspect.

If that proves troublesome, then just a best guess at the formatting (since the markup is very easy to cargo-cult from other sections) and a PR is still much easier to deal with.


rongrw commented Jan 20, 2017

Thanks for the suggestion @mohawk2

Another option is to install the Swim module. This module comes with a utility program called "swim" which can convert (.swim) format to (.pod) format as well as other formats. So, in my case, I use the following command:

swim --to=pod Cookbook.swim > Cookbook.pod


wbraswell commented Jan 20, 2017

As part of your documentation update, can you please include the above info (at least) about the Swim module?


rongrw commented Jan 21, 2017

Hi @wbraswell ,

OK, that's fine. Do you think Swim together with the above command should be mentioned in an Appendix in the Cookbook?


daoswald commented Jan 21, 2017


wbraswell commented Jan 21, 2017

There is not currently a CONTRIBUTING doc, but per @daoswald 's recommendation, you should go ahead and create one to contain your swim info.


rongrw commented Jan 24, 2017

I have now finished my updates to Cookbook.swim. Also, I'm happy to write up a CONTRIBUTING file as suggested by @daoswald . I'll use Inline's version of this file as a guide.

Thanks for all your suggestions.


rongrw commented Jan 26, 2017

I've now completed the CONTRIBUTING file. As I'm a little unsure with what I've written for this file, I've attached it to this post. If you could have a look at it that would be great. Let me know if it needs any further amendments or additions. Thank you.



wbraswell commented Jan 26, 2017

Please add info about the IRC chat room to your CONTRIBUTING.txt file
server: irc.perl.org
channel: #inline


rongrw commented Jan 31, 2017

Thank you @wbraswell for your suggestion.

I've added a section titled "IRC Chat Room" to the CONTRIBUTING file. I've also created a pull request now for updating the C-Cookbook.


perlpunk commented May 19, 2017

i think this can be closed since the PR was applied

@perlpunk perlpunk closed this May 19, 2017


rongrw commented May 20, 2017

@perlpunk , yes, it's fine to close this issue. Regarding having a CONTRIBUTING file in the repo, do you want me to create a new issue for this? Since I wrote this file back in Jan, I'm happy to do that.
Thank you.


perlpunk commented May 20, 2017

@rongrw yeah, that's probably a good idea.
Since Dist::Zilla is already generating a generic CONTRIBUTING file for CPAN, it shouldn't be a problem to put that file into the repo, along with distribution specific advice.
I'll try to talk to @ingydotnet later


rongrw commented May 20, 2017

OK @perlpunk that's fine. We can use the generated CONTRIBUTING file - I'll then add a section on Swim since it's not obvious how to edit the Inline::C Cookbook file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment