There is a line that calls a series of modules before running a command one at a time
obj.update("newtests")
At the end of the chain all it is doing is call: ls -l test_name.
This happens for each test and there are n ls commands run.
I want change this behavior slightly. Instead of running ls n times , i want to collect the test names in a file as tsv
and run ls against all these at once.
obj.update("newtests") #doesn't execute commands, just writes test_name to a file run_command(file_name) #my code to execute contents of file_name
I tried to make a global var but update calls modules that doesn't behave well with global variables.
My question is : How to choose this file name in perl so that the update and run_command functions know about them without passing it as an argument?
The code gets executed in multiple folders concurrently , so the file name should work in distributed environment as well.
Any help is greatly appreciated.