rmcgowan has asked for the wisdom of the Perl Monks concerning the following question:

I've been reading up on modules, packages and OOP, with the intention of creating an application which would be 'packaged' for distribution, using Module::Build.

So, I want to build the skeleton distribution hierarchy, but all the tools (h2xs, module-starter, ...) appear to create a skeleton for a single .pm file.

So, can anyone provide a pointer to tutorials or how-to's on building up one of these skeletons to support multiple .pm (class) files?

Thanks, Bob

  • Comment on How to create a distribution package with multiple class files

Replies are listed 'Best First'.
Re: How to create a distribution package with multiple class files
by ELISHEVA (Prior) on Feb 15, 2011 at 06:16 UTC

    Just keep adding .pm files to the lib directory of your skeleton build and .pl files to the script directory. The build process is smart enough to scan the lib directory and file all the modules stored there. They will be automatically added to your MANIFEST (the list of files that will get bundled into the tarball), when you run build manifest.

    If you haven't seen it already, you might also want to check out, RFC: How to Release Modules on CPAN in 2011. It begins with a section that demystifies the contents of the project work area.

    If you did check it out already, and asked this question because that essay wasn't clear, let me know (you can private message me) and I'll update the RFC - I think it needs a section anyway on tools for building the skeleton directory.

      Thank you. I sort of figured that might be the case, but, as you noted in your how-to (which I had not seen, yet;), there do seem to be some missing details, between writing code and using a CPAN package.

      Almost all of my information comes from a book, "Writing Perl Modules for CPAN", by Sam Tregar, which provides much good info, but also misses a few details.

      Thanks for the pointer.

      Bob