There already modules out there for helping with the task you've just outlined
?
Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco.
| [reply] [d/l] |
I've never needed to use this myself but this is what I've seen other people like demerphq use when working with aliases. You could then keep @foo around somewhere and it handles the details that the values in the variables exist at some other location (without having to use another reference) and because its an alias, would handle holding weakened references just fine. That's the theory anyway. If this module doesn't do it right, this is at least the right idea. The array is implemented as a C array of pointers so all this does it make your packed list of pointers "real" instead of faked in a string.
use Lexical::Alias 'alias';
my $src;
alias $src, $foo[ ... ]
| [reply] [d/l] |
Sorry diotalevi, I'm sure you know what your getting at, but it's going right over my head.
I don't see how Lexical::Alias has anything to do with what Japhy and I were discussing, and as Japhy wrote Lexical::Alias I would have thought that he would have recognised the correspondance if there was one.
The last thing I need for my purposes is the creation of yet more perl internal structures and hash entries (pad entries) pointing to things that I don't have a first name for and couldn't use a second name for, even if they didn't involve using more space--which is exactly what I'm trying to avoid.
Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco.
| [reply] |