Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://562236]
and the sunlight beams...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2018-03-19 23:12 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (246 votes). Check out past polls.