in reply to Re^2: Class::InsideOut - yet another riff on inside out objects.
in thread Class::InsideOut - yet another riff on inside out objects.
I think I have something for you.
I've been raking my brain for ways of having the attribute routine somehow register something like a hook whose call is delayed so that by the time the hook is triggered, the hash is on the pad. I hadn't been able to come up with any approach so far.
The idea I just came up with is simple: tie. :-)
Tie the attribute hash temporarily. The first access to it will trigger a call whence PadWalker can hopefully locate it. The rest is details - create an accessor closure in the appropriate package and untie the hash.
Unfortunately I'm not of much help since 5.6.1 manages the pads differently and I can't write test code to confirm this. But you should be able to make something of it.
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Class::InsideOut - yet another riff on inside out objects.
by adrianh (Chancellor) on Dec 22, 2002 at 01:36 UTC | |
by Aristotle (Chancellor) on Dec 22, 2002 at 02:17 UTC | |
by adrianh (Chancellor) on Dec 22, 2002 at 11:50 UTC | |
Re^4: Class::InsideOut - yet another riff on inside out objects.
by adrianh (Chancellor) on Dec 20, 2002 at 14:23 UTC |