Yes you can. Another important consideration that modules installed in one "environment" will not exist in the other.
I've done something similar to house multiple development and testing environments on the same server.
UPDATE:
Limbic~Region was kind enough to point out that it may exist in both environements if you set @INC to include your "development" include directory.
Taking his idea one step further (I think he was hinting at this in his message to me): set @INC to reference a local environment variable that points to your "current" directory structure of includes. That way, you set an environment variable before execution, and never have to change the actual script as you migrate from env to env. The one major drawback to this approach that I can see is security. If someone can change the environment variable, they could overload the @INC to include potentially malicious modules.
Thoughts? Rebuttal?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.