From: <me...@st...> - 2007-08-16 17:32:45
|
>>>>> "Andrew" == Andrew Gianni <ag...@bu...> writes: Andrew> Dotan, that looks like what I'm looking for and it's roughly what I Andrew> had in mind although I didn't realize that a Class::Prototyped class Andrew> could have multiple parents, which resolves the question of multiple Andrew> mixins. How are they evaluated for execution? For example, if you Andrew> override render_enter in Miner::Utils::Links and Miner::Utils::Text, Andrew> will it just execute both of their render_enter methods in sequence in Andrew> the order you added their parent slot in the foreach loop of Andrew> install_mixins? No, it picks "first found", which actually makes mixins a bit of pain. That's why there's that particularly tricky code in that one project I did for you, to essentially insert the "mixed-in" version in the middle of your inheritance ladder, rather than hanging out on a second parent. It's one of the weakest parts of the Class::Prototyped design, unfortunately, and having chosen that for CGIP, I'm sorta stuck with it. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <me...@st...> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! |