
srhadden
Novice
Dec 28, 2011, 4:06 PM
Post #1 of 5
(1053 views)
|
|
Wanting to debug live code by using a "bypass"?
|
Can't Post
|
|
I have some code that is in production. There isn't a test environment for this code. So I would like to be able to modify it without risk to the development team. So I've thought about this idea. program.pl is the file that our engineering team uses. I must enter program.pl, becaues it is called by something else that I can't change. I want to debug/work on program.pl. I thought maybe I could take program.pl and copy it to my_program.pl. Then at the top of program.pl, do some kind of magic that will execute my_program.pl code if an environment variable is set. Otherwise, it just executes the code that already exists in program.pl. All I would need to do is add a few lines at the top of program.pl, very low risk. So I'm looking for options. I thought there was a command that would let perl take in a string of perl code and then execute it, but I don't know if seeing the same sub-routines defined twice in a perl file would cause a problem, most likely. Or maybe the simple solution is to just put a condition, and execute my second perl script, passing all the arguments to it, and then exiting if an environment variable is set. Thank you for any ideas.
|