sub myFunc { my ($x, $y) = @_; ### Assertion if ($::test) { ### Do something } ### Rest of sub }