There's more than one way to do things | |
PerlMonks |
Re^7: Use method/function signatures with Perlby dragonchild (Archbishop) |
on Dec 06, 2004 at 16:40 UTC ( [id://412690]=note: print w/replies, xml ) | Need Help?? |
That breaks immediately because &foo is expecting an ARRAY, not an object of class Bar.
In other words, because you're (mis)using ref (which we agreed you shouldn't), you already implement the scheme I suggested. However, there's going to be the user (and it's usually someone like me ... :-) that would assume that since I'm using an array to represent my Bar class, it should fit into either an ARRAY or Bar hole. It may not be a code issue as much as a documentation issue. That said, there is still an issue. :-) Being right, does not endow the right to be rude; politeness costs nothing.
In Section
Meditations
|
|