in reply to Development config files

How do you differentiate between the two, as a human?

Replies are listed 'Best First'.
Re^2: Development config files
by willymacoy (Acolyte) on May 15, 2011 at 09:03 UTC

    I have sat here and asked myself that question. With no It Just Works answer.

    One way is have a file in my module-sharedir that doesn't get installed when I use File::ShareDir::Install. I would simply test for that file and I would know.

    I could put a file there, have Makefile.PL remove it, and replace it before exiting.

    If File::UserConfig gave different results like File::ShareDir does then I would be laughing.

      My setup is to have the configuration file passed on the command line. I have different shell scripts that (re)start the development and production process, and they supply the different configuration files to the program.

      Personally, I would hardcode/supply only a single, very basic configuration with the module itself. Provide the option to write a fresh configuration file based on the current environment. Almost all web frameworks provide such helper applications.

Re^2: Development config files
by willymacoy (Acolyte) on May 15, 2011 at 19:43 UTC

    TIL the perl has a -s command line switch.

    Thanks