Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Type globs, strict, and lexical variables

by xmath (Hermit)
on Jul 19, 2006 at 09:16 UTC ( #562236=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Type globs, strict, and lexical variables
in thread Type globs, strict, and lexical variables

Data::Alias isn't that heavyweight I think... I know it's a bit largeish module, but unlike tie() its use imposes virtually no overhead at runtime, and very little at compile time (no source filter).

And it solves your problem nicely, and probably more efficiently than anything involving typeglobs:

alias my @bar = @$foo;

UPDATE: It actually benchmarks faster than local *bar = $foo on my machine, with the benefit of being truly lexically scoped.


Comment on Re^3: Type globs, strict, and lexical variables
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2014-07-29 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls