in reply to trap run time errors

Maybe try use warnings FATAL => 'all'; with strategic evals?

Trying to retrofit old code to make it warning-proof may not be worth the candle. You tend to end up with a lot of $foo // '', which isn't really an improvement.