in reply to Composing or chaining subroutines
1. There is a slight performance gain when you're dealing with more than 3-4 subroutines
That sounds like something that would have to happen in XS.
2. Debugging is much clearer because your callstack only has the subroutine called by the client and not all the intermediate subroutines.
Sub::Uplevel could be used, but that adds overhead instead of subtracting it. (There's also an off-by-one bug in it; I sent a patch to Schwern several months ago but it seems to be way low on his tuit list.)
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
|---|