On Sun, Nov 13, 2005 at 03:22:25PM -0600, Ken Williams wrote: > Because he doesn't have methods, he has functions. They're expecting > one argument, the hash ref, not an additional $self or $class argument > at the beginning. In order to use this solution he'd have to retool > his entire code base of functions to make them methods instead.
It's entirely possible to write your subroutines so that they'll work just fine as either functions *or* class methods *or* instance methods. The code is a bit ghastly though, and I don't recommend it. In fact, I'm taking that particular breed of insanity out of one of my modules that is on the CPAN. Thankfully, I never documented that they could be called as functions, and so I don't feel that I shuold care if their removal breaks anything :-) -- David Cantrell | Nth greatest programmer in the world One person can change the world, but most of the time they shouldn't -- Marge Simpson