Is it possible to disable execution of a specific subroutine, when we are executing the script in DEBUG mode?.
Supoose, sub tryme is being called and takes quite a long time to execute, I would like to disable/skip executing the subroutine.
Thanks,
You can set a global Variable or a Command-Line Variable to set (for example) $debug = 1. Then you could specifiy your sub-calls like that:
_long_function() unless $debug == 1;
or
unless ($debug) {
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With