in reply to wantarray propagation?
In the absence of an explicit return, a subroutine, eval, or do FILE automatically returns the value of the last expression evaluated.So, since you do not have an explicit return in test2, your code is equivalent to
sub test2 { return test(); }
and hence the propagation. If you want it evaluated in a certain context, then evaluate it in that context, perhaps as
sub test2 { test(); return; }
|
---|