- I am integrating a logging framework to my perl project which has around 300 Perl files.
- So I have written a module
Logging.pmwhich has overriddendie,say,warnfunctionalities and sinceprintcannot be overridden I have tied it my custom handle. - I have a master script
execute.plwhich executes all the scripts throughsystem/qx/exec. - I want to include
Logging.pmin justexecute.pland all the functionalities ofLogging.pmshould be availabe in the child process executed by execute.pl throughsystem()orqx()orexec().
Example of Execution:
execute.pl -> system("test1.pl") -> system("test2.pl")
So the test1.pl and test2.pl should pick up the overridden die/warn/say/print if I just include Logging.pm in excute.pl.
As far I know system/qx/exec will be OS call and Logging.pm won't be available in the child process, is there any way I can achive this as I don't want to edit 300 files?