getoptions, configure, new #### use strict; use warnings; use Getopt::Long; my $p = new Getopt::Long::Parser; print join ', ', MembersMatching($p, '[a-z_]'); sub MembersMatching { my ($object, $prefix) = @_; $object = ref $object if ref $object; $prefix ||= ''; no strict; return grep {/^$prefix/ && exists &{"${object}::$_"}} keys %{"${object}::"}; }