in reply to Production / Development on the same server.

The better solution, especially from a sanity perspective, is to have (at least) two directory trees. A dev, a prod, and possibly a QA. By choosing which directory you're in your URL and making sure that all your modules are in a different place for each environment, you will save yourself a ton of headaches. Plus, it makes promoting code a lot easier. This is especially true if you use the QA option. You mnake sure everything works in QA like you want, then mv prod to prod_save and copy QA to prod. No crazy variable changes ... no versions to mess up ... just ease of development and maintenance.

Out of curiousity ... what does it do? I've been thinking about writing a simplified Quicken so I can gedt rid of the last Windows machine in the house. It might be an interesting idea to come with a place to advertise useful home apps written in Perl ...

------
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: Production / Development on the same server.

Replies are listed 'Best First'.
Re: Re: Production / Development on the same server.
by yosefm (Friar) on Sep 06, 2003 at 15:03 UTC
    This is what I do. what I want is to make scripts in /devel use modules in the devel modules dir, and scripts in /use_me_baby use modules in the production dir, without having to state the directory name, just the module version. I want the appropriate module to be automatically selected by perl, but require and use always select the first they see. I thought Acme::No would do the trick, but it just croaks when version is wrong.

    Any way to do this?

      If you have your directory trees be identical and the modules in some relative path from the scripts, you can have the same use lib statement and because it's running somewhere different, it'll go to a different relative path to find the modules.

      ------
      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.