Jonathan Rockway wrote:
* On Sat, Feb 27 2010, Skriptke wrote:
I did a similar question recently:
http://www.nntp.perl.org/group/perl.module-authors/2010/02/msg8235.html
The conclusion: Add any library, etc.. to directory 'share'. Use
install_share 'share'; of Module::Install; to install this. Then used
File::sharedir to recover these files.
I don't think this is relevant to James' problem. He seems to only want
files during testing, not after the module is installed.
Actually, the files in question are not needed during my own testing of
the distribution or during 'make test'. Since, their purpose is purely
illustrative, they really count just as "extra documentation."
In that case:
Two questions related to the directory structure of a distribution
intended for CPAN:
1. What is the current best practice for including sample Perl 5
programs intended to illustrate usage of the module? What directory
should they be placed in?
I put them in examples/. Unfortunately, search.cpan doesn't make any
effort to advertise this, so you will have to do it yourself. ("Take a
look at the examples in "examples/".)
I will try this: an examples/ directory just under the top level.
2. Is it possible to include another archive file in a CPAN
distribution and not have it interfere with the normal operations of
the distribution?
I have done this and have not seen any problems. Tar is not recursive,
so you'll just have the tar.gz in the right place. (Just make sure the
file isn't skipped in MANIFEST.SKIP; I usually have .tar.gz in mine.
"make manifest" and verify before "make dist", for maximum safety :)
Currently I have a .tar.gz in a directory called 't/testdata/'. I will
re-test this to make sure it DWIMs. (I, too, usually have '.tar.gz' in
my MANIFEST.SKIP and so I got burned on this at first. I've since
adjusted the MANIFEST.SKIP.)
Thanks, Skriptke and Jonathan. I will report further results.
jimk