|laziness, impatience, and hubris|
Re^5: Use method/function signatures with Perlby dragonchild (Archbishop)
|on Dec 06, 2004 at 16:16 UTC||Need Help??|
Let's say I have a subroutine defined as
And, I have a class Bar. Today, it is defined as
This means that
will work just fine. But, what happens if the implementation of Bar changes from arrayref to hashref? This is a completely internal change, but one that will break the code listed above.
Personally, I would define it to be
In other words, if it's been blessed, you only consider the class - not the underlying implementation.
Being right, does not endow the right to be rude; politeness costs nothing.