Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Scope in use (get rid of it)

by tye (Sage)
on Sep 07, 2017 at 19:58 UTC ( #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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1198884]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2022-08-09 19:35 GMT
Find Nodes?
    Voting Booth?

    No recent polls found