With this in place, I don't have to maintain a list of all my files; 'make manifest' will start at the current directory and assemble a list of all files not matching the patterns in MANIFEST.SKIP, then write the names of those files to MANIFEST.\bCVS\b ^MANIFEST\. ^Makefile$ ~$ \.old$ ^blib/ ^pm_to_blib$ \.tar\.gz$
So, to create a new distribution, I can do:
I keep my MANIFEST.SKIP under source control but that's not really necessary.perl Makefile.PL make manifest make dist
As an example, the Makefile.PL for Net::SSH::Perl lets the user choose whether to install the prereqs for SSH-1 or SSH-2 (or both), which means that if the user really only wants SSH-1 support, he/she doesn't have to install a bunch of modules he/she doesn't need. Of course, this also means you have to learn to love using require in your code, for runtime loading of modules. :)
Another useful Makefile.PL "trick" is to a "does user have this module installed?" function:
This allows you to do your own prerequisite checking in Makefile.PL, because unfortunately, the prereq checking in the CPAN module depends on having an explicit list of args to PREREQ_PM; it actually parses your Makefile.PL to look for such a list. If you have, for example, this:sub have_mod { my($mod, $ver) = @_; eval("use $mod" . ($ver ? " $ver;" : ";")); !$@; }
then it won't pick up the list of prereqs correctly. So if that list is dynamic, then you may need to do your own checking.PREREQ_PM => \%prereq,
In reply to Re: Starting the development of a module : thoughts
by btrott
in thread Starting the development of a module : thoughts
by Masem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |