CountZero has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a module and this module reads a configuration file (actually a YAML-file) which is stored in a directory one level down the module. I tried to get at it by using the file path ./one_level_down/config.yml, but that fails as this relative path starts at the location of the script useing the module.
Is there a simple way of pulling in the file_path of the module so I can build an absolute path?
I will still have a problem then with the tests, won't I as they use another directory structure?
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Handling config-files in Tests
by kyle (Abbot) on Feb 16, 2007 at 18:10 UTC | |
by CountZero (Bishop) on Feb 16, 2007 at 20:30 UTC | |
|
Re: Handling config-files in Tests
by dragonchild (Archbishop) on Feb 17, 2007 at 09:56 UTC | |
by CountZero (Bishop) on Feb 17, 2007 at 10:55 UTC | |
|
Re: Handling config-files in Tests (SOLVED)
by xdg (Monsignor) on Feb 17, 2007 at 13:47 UTC | |
by CountZero (Bishop) on Feb 18, 2007 at 09:54 UTC | |
|
Re: Handling config-files in Tests
by fenLisesi (Priest) on Feb 17, 2007 at 10:32 UTC | |
by CountZero (Bishop) on Feb 17, 2007 at 11:00 UTC | |
by dragonchild (Archbishop) on Feb 17, 2007 at 19:37 UTC |