in reply to Scope::Upper localize?
If you, as you claim, do have a real use case for Scope::Upper, I'm really interested in hearing about it.
The only "use case" I can come up with is getting a callback or releasing a resource once the calling scope is left. And I think that is much better achieved by cooperating with the calling scope and returning a Guard object (there are many implementations of that, on CPAN and outside). Especially as returning a guard object allows you to easily write a shim that can go between the scope that is relevant for leaving and the scope in which the callback is installed.
Maybe my imagination is just too limited, and I'd welcome if you can show where Scope::Upper is a solution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Scope::Upper localize?
by tobyink (Canon) on Sep 11, 2012 at 09:09 UTC | |
by Anonymous Monk on Sep 11, 2012 at 09:11 UTC | |
|
Re^2: Scope::Upper localize?
by Anonymous Monk on Sep 11, 2012 at 10:09 UTC | |
by Corion (Patriarch) on Sep 11, 2012 at 10:34 UTC | |
by Anonymous Monk on Sep 11, 2012 at 19:49 UTC | |
by Corion (Patriarch) on Sep 11, 2012 at 20:11 UTC | |
by Anonymous Monk on Sep 11, 2012 at 20:54 UTC | |
|