|more useful options|
List Wrapper for Object Methods.by pelagic (Priest)
|on Dec 03, 2004 at 08:47 UTC||Need Help??|
pelagic has asked for the
wisdom of the Perl Monks concerning the following question:
Good morning monks!
I just ran into a "problem" with OO coding and I'm sure there's some elegant solution out there. So let's give it a try:
I got a Module Anything with a couple of methods. Now I want to have lists of Anything objects as Anything::List objects and I want to call the Anything methods on all objects in a Anything::List in a row.
That's easy of course but there are a lot of methods in Anything and all their Anything::List equivalents look exactly the same and thats actually bothering me!
And here is a snippet for demonstration:
Thanks for some inspiring hints!