in reply to What does it mean for a Perl feature to be Magic?
There's a general "handwaving" magic, where the author isn't really interested in describing the (probably bizarrely complicated) mechanism by which a particular process happens. In this case, the magic is knowable, but you probably won't need to know, or even want to ask.
There's also a specific "magic" bitfield attached to every symbol table entry inside. This bitfield records unusual properties about that variable. For example, a tied variable needs to be able to announce that something unsual will happen when it is fetched or stored, so the "tied" "magic" bit is set, and checked by those accessing mechanisms.
So yes, there's "magic" you don't want to know, and there's "magic" that actually means something very specific. Hope that helps.
-- Randal L. Schwartz, Perl hacker
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Magic
by mischief (Hermit) on Oct 13, 2001 at 19:08 UTC |