Have you heard of local? See source of Web::Scraper, the jist of which is
sub my_outer(&) { my( $callback ) = @_; my $stash = {}; no warnings 'redefine'; ## closure local *my_inners = sub { ... $stash ... }; local *foo = sub { ... $stash ... }; local *result = sub { ... $stash ... }; return $callback->( $stash ); }
In reply to Re: Making lexically-scoped ref available to non-OO subs in another package
by Anonymous Monk
in thread Making lexically-scoped ref available to non-OO subs in another package
by wanna_code_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |