5

I create some modules without using Module::Starter :(. I need to build a MANIFEST file to run my tests. Should I do it by hand, or is there an automated way to build it ?

smonff
  • 3,399
  • 3
  • 36
  • 46
  • 2
    I can't delete my accepted answer, but there is a better answer. So, please go accept the other one. Otherwise, my answer is going to keep getting downvoted. – Sinan Ünür Oct 27 '11 at 19:37

4 Answers4

22

Run make manifest or ./Build manifest, depending on the build tool.

It will call mkmanifest for you.

daxim
  • 39,270
  • 4
  • 65
  • 132
  • 3
    Whether or not Module::Starter was used, if there is a Makefile.PL or Build.PL written by hand, then this is a good recommendation. – xdg Oct 27 '11 at 15:14
  • True. I guess I took the question too literally. This is definitely a better answer (although I don't think my answer needed to be voted down). – Sinan Ünür Oct 27 '11 at 16:54
  • I'm a little newbie with this. If I just call make manifest I get : `nothing to be done for manifest` – gideon Jan 30 '13 at 05:38
7

You can create manifest using ExtUtils::Manifest package:

perl -MExtUtils::Manifest=mkmanifest -e 'mkmanifest()'

This oneliner will create manifest in current dir. It also will use MANIFEST.SKIP if you have one.

yko
  • 2,710
  • 13
  • 15
4

If you install Dist::Zilla, you can set up a simple dist.ini file and then run dzil build. That will create a MANIFEST and other necessary files for releasing a distribution.

Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
friedo
  • 65,762
  • 16
  • 114
  • 184
4

Well, there is ExtUtils::Manifest:

mkmanifest

   mkmanifest();

Writes all files in and below the current directory to your MANIFEST. It works similar to the result of the Unix command

   find . > MANIFEST

All files that match any regular expression in a file MANIFEST.SKIP (if it exists) are ignored.

Any existing MANIFEST file will be saved as MANIFEST.bak.

For example:

$ perl -mExtUtils::Manifest=mkmanifest -e 'mkmanifest()'
Community
  • 1
  • 1
Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
  • This answer helped but I had to do it like this on the bash command line : `perl -e 'use ExtUtils::Manifest qw(mkmanifest); mkmanifest();'` – gideon Jan 30 '13 at 05:39