<?xml version="1.0" encoding="windows-1252"?>
<node id="221266" title="Re^3: Class::InsideOut - yet another riff on inside out objects." created="2002-12-19 17:07:13" updated="2005-07-27 14:05:08">
<type id="11">
note</type>
<author id="114691">
Aristotle</author>
<data>
<field name="doctext">
&lt;p&gt;I think I have something for you.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;The idea I just came up with is simple: [perlfunc:tie|tie]. &lt;tt&gt;:-)&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Tie the attribute hash temporarily. The first access to it will trigger a call whence [cpan://PadWalker] can hopefully locate it. The rest is details - create an accessor closure in the appropriate package and untie the hash.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p align="right"&gt;&lt;em&gt;Makeshifts last the longest.&lt;/em&gt;&lt;/p&gt;</field>
<field name="root_node">
220776</field>
<field name="parent_node">
220999</field>
</data>
</node>
