sub myFunc { my ($x, $y) = @_; ### Assertion if ($::test) { ### Do something } ### Rest of sub }
Might help if you could give an example of what a simple sub might do with and without an assertion.
In reply to Re: Pre/post subroutine assertions and documentation module?
by TJPride
in thread Pre/post subroutine assertions and documentation module?
by suaveant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |