in reply to Handling config-files in Tests (SOLVED)

Would it be possible to put the conf right there in the same file as the MyApp::Config module that returns a config object, in the __DATA__ section?

Replies are listed 'Best First'.
Re^2: Handling config-files in Tests
by CountZero (Bishop) on Feb 17, 2007 at 11:00 UTC
    Yes, there is no reason the config-data could not be put in the module itself, other than that I personally like the config data to be in a separate file and in the vague hope that I will write a script to automatically fill the conf-file with the necessary data every time the underlying data changes.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

      And the fact that putting the config in the module severely limits the usefulness of the module.

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?