Every time the subroutine calls itself, a few bytes are pushed on to the stack to store the return address. |
A unit test would directly call the subroutine I want to test, and it would rely as little as possible on other subroutines in the program. |
That means, the call to a subroutine must be on its program line rather than somewhere in an expression. |
It can find the bug if you ask your subroutine for a scalar, but you mistakenly have the subroutine return an array. |
To be safe you can use the keyword before any subroutine call even if the subroutine is already defined. |
The first, unit testing, tests a very small subroutine to see that it does what it should. |