Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: using constants in Derived classby moritz (Cardinal) |
on Nov 17, 2010 at 10:36 UTC ( [id://871975]=note: print w/replies, xml ) | Need Help?? |
I'd like to bring some curious implementation details to your attention:
Combining these curious features, you'll notice that
So if you access the constant as methods, everything should work according to your wishes. What a coincidence :-) That way it's much more extensible than using a big if-elsif-else construct, and I consider that a good thing. It's a typical OO style, and if your application is already OO, it's good to conform to that stlye.
In Section
Seekers of Perl Wisdom
|
|