How do I use beta Perl modules from beta Perl scripts?
Posted
by DVK
on Stack Overflow
See other posts from Stack Overflow
or by DVK
Published on 2010-03-19T02:14:49Z
Indexed on
2010/03/19
3:21 UTC
Read the original article
Hit count: 905
If my Perl code has a production code location and "beta" code location
(e.g. production Perl code us in /usr/code/scripts
, BETA Perl code is in /usr/code/beta/scripts
; production Perl libraries are in /usr/code/lib/perl
and BETA versions of those libraries are in /usr/code/beta/lib/perl
, is there an easy way for me to achieve such a setup?
The exact requirements are:
The code must be THE SAME in production and BETA location.
To clarify, to promote any code (library or script) from BETA to production, the ONLY thing which needs to happen is literally issuing
cp
command from BETA to prod location - both the file name AND file contents must remain identical.BETA versions of scripts must call other BETA scripts and BETA libraries (if exist) or production libraries (if BETA libraries do not exist)
The code paths must be the same between BETA and production with the exception of base directory (
/usr/code/
vs/usr/code/beta/
)
I will present how we solved the problem as an answer to this question, but I'd like to know if there's a better way.
© Stack Overflow or respective owner