Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Scope in use (get rid of it)

by tye (Sage)
on Sep 07, 2017 at 19:58 UTC ( [id://1198884] : note . print w/replies, xml ) Need Help??

in reply to Scope in use

There have been quite a few times over the last decade where I would have made something very nice had use not had that implied scope around it. So much so, that I dreamed of implementing a non-scope version of BEGIN (but never did):

my $lib = 'foo' BEGIN;

So if somebody patches Perl to make use not have an implied scope, that would make me happy.

- tye        

Replies are listed 'Best First'.
Re^2: Scope in use (get rid of it)
by Corion (Patriarch) on Sep 07, 2017 at 20:22 UTC

    I think BEGIN::Lift claims to do that, but it only extends to lifting subroutine calls. Depending on your actual use case, this might be enough already.

    Update: Also, Devel::BeginLift, which does the same according to BEGIN::Lift.