in reply to regex-codeblock calling subroutines?
My understanding of match-time code evaluation is that the code-evaluation is not done in an order that is easy to predict. Regular expressions require that a regex-"engine" be built prior to the evaluation of the string. Secondly, the evaluation is not strictly and directly from left to right. This is more an event-driven code evaluation than a proceedural code evaluation. I.e., even if you can get this to run, it will be very difficult to maintain. We aren't byte/cycle miserly in Perl. There are other languages for that personality of programming.
I like what you are trying to do, but don't think this is the design style that will yield the best design. Rebuttal is welcome.