Create generic methods for OO Perl