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

Hello Monks, I have been writing scripts and packages without any structure/framework. Recently, I learned about h2xs and now I use this whenever I can to add modules and test cases. This is all fine for plain vanila modules. My question is, in my current project I have multiple config files (*.cfg). I added them to the manifest file. So my manifest file looks like this:
Changes Makefile.PL MANIFEST README t/EM.t lib/EM.pm cfg/log.conf cfg/AppConfig.conf cfg/EMConfig.conf cfg/UserConfig.conf
Now, when I do  nmake install, I was expecting these configs to be copied to the install path. However, this does not happen. Is there something I am missing here?

Also, the test cases I have, would require the configs. Do I have to manually copy the .conf files to the \t directory for testing purpose? I was thinking, it would be cool to have nmake test should somehow automatically refer/copy the configs correctly.

Gracias, Dece

Replies are listed 'Best First'.
Re: adding new files to distribution
by ikegami (Patriarch) on Sep 30, 2009 at 04:35 UTC

    I was expecting these configs to be copied to the install path

    Which install path? binaries? library? Somewhere else?

    Do I have to manually copy the .conf files to the \t directory for testing purpose?

    No. They will be placed under blib by make (when you have your Makefile done right). Then you can just refer to them using a relative path.

Re: adding new files to distribution
by Anonymous Monk on Sep 30, 2009 at 04:50 UTC
Re: adding new files to distribution
by Anonymous Monk on Sep 30, 2009 at 04:52 UTC
    A MANIFEST is just a list of all the files in the distribution (tarball), it doesn't control what gets installed.
      Ah .. So how do I specify the new configs I want to be installed. Should that be part of the make file?
Re: adding new files to distribution
by Bloodnok (Vicar) on Sep 30, 2009 at 11:30 UTC
    Having edited your MANIFEST, try re-generating the makefile, by running the command: perl Makefile.PL.

    If the directory structure is tidied up to remove all files except (thus containing only) those required in the distribution, assuming the Makefile has already been generated, in order to re-build the MANIFEST and get the extra files included in the distribution, I've found that the following is a little more reliable:

    rm MANIFEST make manifest perl Makefile.PL
    A user level that continues to overstate my experience :-))
      Should we specify all configs/modules we require as part of the Makefile? I am guessing this will automatically generate the right MANIFEST.
        No, there's no need to specify _any_ files since they [the files] specify themselves by existing in the structure when the makefile &/or MANIFEST is/are re-generated.

        In hindsight, one of the quickest ways to re-generate the MANIFEST and the makefile is

        make realclean rm MANIFEST perl Makefile.PL make
        A user level that continues to overstate my experience :-))