From: Alex Becker
Sent: Thursday, June 09, 2016 4:45 AM
To: beginners@perl.org
Subject: Where to put xs files?
Hi!

Where do I put xs files in a module distribution?

For example, the module Tk::IDElayout contains the following files:
* CaptureRelease.pm
* CaptureRelease.xs
* WmCaptureRelease.c
* WmCaptureRelease.h

They are currently all located in the root folder of the module dist.

If I would move the file CaptureRelease.pm to lib/Tk/CaptureRelease.pm, would I have to move the xs file, too?

No - I see other distros where the pm file is under lib/ but the xs file is still in the top level directory. However, it may also work ok if you move the xs file to the same place as the pm file. I don't know the rules involved here, and there might even be configuration options that provide additional flexibility.

I recommend testing any alterations you make to the layout as you go.

And ask again if you can't get your preferred layout to work.

Cheers,
Rob

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to