in reply to Pre/post subroutine assertions and documentation module?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pre/post subroutine assertions and documentation module?
by educated_foo (Vicar) on Jan 12, 2012 at 18:22 UTC | |
|
Re^2: Pre/post subroutine assertions and documentation module?
by suaveant (Parson) on Jan 12, 2012 at 18:19 UTC |