use Class::Inspector; # Only get public methods my $meths = Class::Inspector->methods( 'Bah', 'public' ); # $meths should contain [ 'new', 'printBah' ]