Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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 (Pope) 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1198884]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2018-08-16 07:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (167 votes). Check out past polls.

    Notices?