in reply to Switching Between Development and Production Environments

Why not pass the name of the datafile in? Sounds like the easiest way to do it ... Another would be to have an ini file in the same directory as the perl script and have it know where the appropriate datafile should be.

Both those ways are examples of separating data from function. Don't hardcode stuff if you don't have to.

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

  • Comment on Re: Switching Between Development and Production Environments

Replies are listed 'Best First'.
Re: Re: Switching Between Development and Production Environments
by svsingh (Priest) on Oct 06, 2003 at 17:32 UTC
    Thanks dragonchild. I should have mentioned that the script is being run as a web app, so I can't really pass in the data file as an argument without exposing it to users. (As far as I know.) I like the ini file idea. I'll give that a shot. Thank you.