in reply to examples in CPAN distributions

For trivial modules, the examples are encompassed by the tests, in t/*.t which is the standard place. For test data, there is no convention.

For something non-trivial, having example code is a good idea. Again there is no convention that I'm aware of.

Do you have a preference? If so, please tell us. Expressing it in Perlmonks is a good way to get feedback, and to set conventions and standards in the Perl community.

wetware hacker
(Qualified NLP Practitioner and Hypnotherapist)