« Back to the main page

Language: Plain Text, Submitted: 8/23/10, Country: United Kingdom - Raw | Download
sub get_attr_and_meth {
    my $metaclass = shift;

    my @methodes = ("new");    # new is always present
                               # Moose methodes will not be included
                               # attributes are treated as methods
    for my $meth_obj ( $metaclass->get_all_methods ) {
        my $methode = $meth_obj->etc;
        if ( $methode !~ /^Moose::Object/ ) {
            $methode =~ s/.+:://;
            push @methodes, $methode;
        }
    }
    return sort @methodes;
}