in reply to Strictly nested sub warnings

Here's another piece of documentation that seems pertinent. In perlref there's a section entitled Function Templates (almost at the bottom of the page).

The part probably of most interest starts with:

... incurs mysterious warnings about "will not stay shared" ...

and ends with

This has the interesting effect of creating a function local to another function, something not normally supported in Perl.