Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Possible to make alias for 'use' ?

by Anonymous Monk
on Oct 07, 2011 at 07:17 UTC ( #930130=note: print w/ replies, xml ) Need Help??


in reply to Re: Possible to make alias for 'use' ?
in thread Possible to make alias for 'use' ?

It seems won't work...

sub With { eval "use @_"; } With 'strict'; $x = 10;
It didn't die() as what I would expect... It that any hacks to deal with *CORE:: stuff ?


Comment on Re^2: Possible to make alias for 'use' ?
Select or Download Code
Re^3: Possible to make alias for 'use' ?
by Anonymous Monk on Oct 07, 2011 at 07:22 UTC
    strict is lexically scoped, this won't die either
    sub Foo { use strict; @_ } $x = 1;

    If you want to fiddle with strict/warnings, see Toolkit, nonsense...

      Hmm... I just wish to see if there's a way to make an alias to use() anyway... which they might act identically..
        No

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2014-12-19 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (85 votes), past polls