in reply to Confused about typeglobs and references
Assigning a reference to a typeglob (not a reference to a typeglob!) populates the appropriate slot within the typeglob. For example, *a = []; populates something you can address as @a. If you're passing arguments to a function, what would happen if someone sent the wrong reference type? *a = {}; is very different.
Consequently, I think you're much better off working with references explicitly. Run-time symbol table manipulation is powerful, and one percent of the time it's absolutely necessary. I think this falls strongly within the remaining 99%.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Confused about typeglobs and references
by Argel (Prior) on Nov 04, 2002 at 22:13 UTC | |
by chromatic (Archbishop) on Nov 04, 2002 at 22:56 UTC | |
by Ovid (Cardinal) on Nov 04, 2002 at 23:02 UTC |