Examine Yr Moose
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
John SJ Anderson 55f07a1eed Fix version number fuckup 2 months ago
bin update Dancer syntax 8 years ago
lib/MooseX remove smartmatch usage 5 years ago
releases Fix version number fuckup 2 months ago
share sort tree 9 years ago
t Bug fix for test 'Unfound path in constructor error message' 5 years ago
.gitignore don't ignore releases 9 years ago
Changes Correct version number 2 months ago
Makefile.PL auto-committed by dist.ini 2 months ago
README.md README 2 months ago
dist.ini Update repo metadata 2 months ago



MooseX::amine - Examine Yr Moose


version 0.07


my $mex  = MooseX::amine->new( 'MooseX::amine' );
my $data = $mex->examine;

my $attributes = $data->{attributes};
my $methods    = $data->{methods};



# these two are the same
my $mex = MooseX::amine->new( 'Module' );
my $mex = MooseX::amine->new({ module => 'Module' });

# or you can go from the path to the file
my $mex = MooseX::amine->new({ path = 'path/to/Module.pm' });

# there are a number of options that all pretty much do what they say.
# they all default to off
my $mex = MooseX::amine->new({
  module                           => 'Module' ,
  include_accessors_in_method_list => 1,
  include_moose_in_isa             => 1,
  include_private_attributes       => 1,
  include_private_methods          => 1,
  include_standard_methods         => 1,


my $mex  = MooseX::amine( 'Module' );
my $data = $mex->examine();

Returns a multi-level hash-based data structure, with two top-level keys, attributes and methods. attributes points to a hash where the keys are attribute names and the values are data structures that describe the attributes. Similarly, methods points to a hash where the keys are method names and the values are data structures describing the method.

A sample attribute entry:

simple_attribute => {
  accessor => 'simple_attribute',
  from     => 'Module',
  meta     => {
    constraint => 'Str'

The prescence of an accessor key indicates that this attribute was defined with is = ‘rw'>. A read-only attribute will have a reader key. A writer key may also be present if a specific writer method was given when creating the attribute.

Depending on the options given when creating the attribute there may be various other options present under the meta key.

A sample method entry:

simple_method => {
  code => 'sub simple_method   { return \'simple\' }',
  from => 'Module'

The code key will contain the actual code from the method, extracted with PPI. Depending on where the method code actually lives, this key may or may not be present.


  • Semi-inspired by MooseX::Documenter.
  • Syntax highlighting Javascript/CSS stuff based on SHJS and largely stolen from search.cpan.org.


John SJ Anderson john@genehack.org


This software is copyright (c) 2020 by John SJ Anderson.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.