---
abstract: Automatically generate documentation stubs for Moose-based classes.
-author: ~
+author:
+ - =over 4
build_requires:
Test::More: 0
distribution_type: module
generated_by: Module::Install version 0.68
-license: unknown
+license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.3.html
version: 1.3
# MakeMaker Parameters:
# ABSTRACT => q[Automatically generate documentation stubs for Moose-based classes.]
+# AUTHOR => q[=over 4]
# DIR => []
# DISTNAME => q[MooseX-AutoDoc]
# NAME => q[MooseX::AutoDoc]
O_FILES =
H_FILES =
MAN1PODS =
-MAN3PODS = lib/MooseX/AutoDoc/View/TT.pm
+MAN3PODS = lib/MooseX/AutoDoc.pm \
+ lib/MooseX/AutoDoc/View/TT.pm
# Where is the Config information that we are using/depend on
CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
TO_INST_PM = lib/MooseX/AutoDoc.pm \
lib/MooseX/AutoDoc/View.pm \
- lib/MooseX/AutoDoc/View/TT.pm
+ lib/MooseX/AutoDoc/View/TT.pm \
+ make_docs.pl
-PM_TO_BLIB = lib/MooseX/AutoDoc/View/TT.pm \
+PM_TO_BLIB = make_docs.pl \
+ $(INST_LIB)/MooseX/make_docs.pl \
+ lib/MooseX/AutoDoc/View/TT.pm \
blib/lib/MooseX/AutoDoc/View/TT.pm \
lib/MooseX/AutoDoc/View.pm \
blib/lib/MooseX/AutoDoc/View.pm \
manifypods : pure_all \
- lib/MooseX/AutoDoc/View/TT.pm
+ lib/MooseX/AutoDoc/View/TT.pm \
+ lib/MooseX/AutoDoc.pm
$(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) \
- lib/MooseX/AutoDoc/View/TT.pm $(INST_MAN3DIR)/MooseX::AutoDoc::View::TT.$(MAN3EXT)
+ lib/MooseX/AutoDoc/View/TT.pm $(INST_MAN3DIR)/MooseX::AutoDoc::View::TT.$(MAN3EXT) \
+ lib/MooseX/AutoDoc.pm $(INST_MAN3DIR)/MooseX::AutoDoc.$(MAN3EXT)
$(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="undef,0,0,0">' > $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <TITLE>$(DISTNAME)</TITLE>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <ABSTRACT>Automatically generate documentation stubs for Moose-based classes.</ABSTRACT>' >> $(DISTNAME).ppd
- $(NOECHO) $(ECHO) ' <AUTHOR></AUTHOR>' >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) ' <AUTHOR>=over 4</AUTHOR>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <DEPENDENCY NAME="Moose" VERSION="0,36,0,0" />' >> $(DISTNAME).ppd
$(NOECHO) $(ECHO) ' <DEPENDENCY NAME="Template" VERSION="0,0,0,0" />' >> $(DISTNAME).ppd
pm_to_blib : $(TO_INST_PM)
$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', '\''$(PM_FILTER)'\'')' -- \
+ make_docs.pl $(INST_LIB)/MooseX/make_docs.pl \
lib/MooseX/AutoDoc/View/TT.pm blib/lib/MooseX/AutoDoc/View/TT.pm \
lib/MooseX/AutoDoc/View.pm blib/lib/MooseX/AutoDoc/View.pm \
lib/MooseX/AutoDoc.pm blib/lib/MooseX/AutoDoc.pm
sub _build_ignored_method_metaclasses {
return {
- 'Moose::Meta::Role::Method' => 1,
'Moose::Meta::Method::Accessor' => 1,
'Moose::Meta::Method::Constructor' => 1,
'Class::MOP::Method::Accessor' => 1,
'Class::MOP::Method::Constructor' => 1,
};
+# 'Moose::Meta::Role::Method' => 1,
# 'Moose::Meta::Method::Overridden' => 1,
# 'Class::MOP::Method::Wrapped' => 1,
+
}
sub _build_license_text {
# *_info methods
-sub role_info {
+sub _role_info {
my ($self, $role) = @_;
my (@roles_to_apply, $rmeta, $original_apply);
my @attributes = map{ $anon->get_attribute($_) } sort $anon->get_attribute_list;
- my %ignored_method_metaclasses = %{ $self->ignored_method_metaclasses };
- delete $ignored_method_metaclasses{'Moose::Meta::Role::Method'};
my @methods =
- grep{ ! exists $ignored_method_metaclasses{$_->meta->name} }
+ grep{ ! exists $self->ignored_method_metaclasses->{$_->meta->name} }
map { $anon->get_method($_) }
grep { $_ ne 'meta' } #it wasnt getting filtered on the anon class..
sort $anon->get_method_list;
- my @method_specs = map{ $self->method_info($_) } @methods;
- my @attribute_specs = map{ $self->attribute_info($_) } @attributes;
+ my @method_specs = map{ $self->_method_info($_) } @methods;
+ my @attribute_specs = map{ $self->_attribute_info($_) } @attributes;
{ #fix Moose::Meta::Role and apply the roles that were delayed
$rmeta->remove_method("apply");
map { $_->isa("Moose::Meta::Role::Composite") ? @{$_->get_roles} : $_ }
@{ $meta->get_roles };
- my @role_specs = map{ $self->consumed_role_info($_) } @roles;
+ my @role_specs = map{ $self->_consumed_role_info($_) } @roles;
my $spec = {
name => $meta->name,
}
-sub class_info {
+sub _class_info {
my ($self, $class) = @_;
my (@roles_to_apply, $rmeta, $original_apply);
grep { $_ ne 'meta' } #it wasnt getting filtered on the anon class..
sort $meta->get_method_list;
- my @method_specs = map{ $self->method_info($_) } @methods;
- my @attribute_specs = map{ $self->attribute_info($_) } @attributes;
- my @superclass_specs = map{ $self->superclass_info($_) } @superclasses;
+ my @method_specs = map{ $self->_method_info($_) } @methods;
+ my @attribute_specs = map{ $self->_attribute_info($_) } @attributes;
+ my @superclass_specs = map{ $self->_superclass_info($_) } @superclasses;
{ #fix Moose::Meta::Role and apply the roles that were delayed
$rmeta->remove_method("apply");
my @roles = sort{ $a->name cmp $b->name }
map { $_->isa("Moose::Meta::Role::Composite") ? @{$_->get_roles} : $_ }
@{ $meta->roles };
- my @role_specs = map{ $self->consumed_role_info($_) } @roles;
+ my @role_specs = map{ $self->_consumed_role_info($_) } @roles;
my $spec = {
name => $meta->name,
return $spec;
}
-sub attribute_info{
+sub _attribute_info{
my($self, $attr) = @_;;
my $attr_name = $attr->name;
my $spec = { name => $attr_name };
return $spec;
}
-sub superclass_info {
+sub _superclass_info {
my($self, $superclass) = @_;
my $spec = { name => $superclass->name };
return $spec;
}
-sub method_info {
+sub _method_info {
my($self, $method) = @_;
my $spec = { name => $method->name };
return $spec;
}
-sub consumed_role_info {
+sub _consumed_role_info {
my($self, $role) = @_;;
my $spec = { name => $role->name };
return $spec;
__END__;
+=head1 NAME
+
+MooseX::AutoDoc - Automatically generate documentation for Moose-based classes
+
+=head1 SYNOPSYS
+
+ use MooseX::AutoDoc;
+ my $autodoc = MooseX::AutoDoc->new
+ (
+ authors =>
+ [
+ {
+ name => "Guillermo Roditi",
+ email => 'groditi@cpan.org',
+ handle => "groditi",
+ }
+ ],
+ );
+
+ my $class_pod = $autodoc->generate_pod_for_class("MyClass");
+ my $role_pod = $autodoc->generate_pod_for_role("MyRole");
+
+=head1 DESCRIPTION
+
+MooseX::AutoDoc allows you to automatically generate POD documentation from
+your Moose based objects by introspecting them and creating a
+
+=head1 NOTICE REGARDING ROLE CONSUMPTION
+
+To accurantely detect which methods and attributes are part of the class / role
+being examined and which are part of a consumed role the
+L</"generate_pod_for_role"> and L</"generate_pod_for_class"> methods need to
+delay role consumption. If your role or class has been loaded prior to calling
+these methods you run a risk of recieving inacurate data and a warning will be
+emitted.
+
+=head1 ATTRIBUTES
+
+Unless noted otherwise, you may set any of these attributes at C<new> time by
+passing key / value pairs to C<new> where the key is the name of the attribute
+you wish to set. Unless noted otherwise accessor methods for attributes also
+share the same name as the attribute.
+
+=head2 authors
+
+=over 4
+
+=item B<predicate> - has_authors
+
+=back
+
+Optional read-write value of type
+L<ArrayRef[HashRef]|Moose::Util::TypeConstraints> representing the authors of
+the class / role being documented. These values are passed directly to the view
+and the default TT view accepts entries in the following form
+(all fields optional)
+
+ {
+ name => 'Guillermo Roditi',
+ handle => 'groditi',
+ email => '<groditi@gmail.com>',
+ }
+
+=head2 ignored_method_metaclasses
+
+=over 4
+
+=item B<builder> - _build_ignored_method_metaclasses
+
+Default to the Moose and Class::MOP method metaclasses for generated methods,
+accessors, and constructors.
+
+=item B<clearer> - clear_ignored_method_metaclasses
+
+=item B<predicate> - has_ignored_method_metaclasses
+
+=back
+
+Required read-write lazy-building value of type
+L<HashRef|Moose::Util::TypeConstraints> where the keys are method metaclasses
+MooseX::AutoDoc should ignore when creating a method list.
+
+=head2 license_text
+
+=over 4
+
+=item B<builder> - _build_license_text
+
+=item B<clearer> - clear_license_text
+
+=item B<predicate> - has_license_text
+
+=back
+
+Required read-write lazy-building value of type
+L<Str|Moose::Util::TypeConstraints>. By default it will use the following text:
+
+ This library is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
+
+=head2 tc_to_lib_map
+
+=over 4
+
+=item B<builder> - _build_tc_to_lib_map
+
+=item B<clearer> - clear_tc_to_lib_map
+
+=item B<predicate> - has_tc_to_lib_map
+
+=back
+
+Required read-write lazy-building value of type
+L<HashRef|Moose::Util::TypeConstraints>. The keys refer to type constraint
+names and the values to the module where the documentation available for that
+type is. Please note that if you are using MooseX::Types libraries the links
+will be automatically generated if the library class can be found (most cases).
+
+=head2 view
+
+=over 4
+
+=item B<builder> - _build_view
+
+Returns 'MooseX::AutoDoc::View::TT'
+
+=item B<clearer> - clear_view
+
+=item B<predicate> - has_view
+
+=back
+
+Required read-write lazy-building value of type AutoDocView. The AutoDocView
+type will accept an Object that isa L<MooseX::AutoDoc::View>. This attribute
+will attempt to coerce string values to instances by treating them as class
+names and attempting to load and instantiate a class of the same name.
+
+=head1 METHODS
+
+=head2 new $key => $value
+
+Instantiate a new object. Please refer to L</"ATTRIBUTES"> for a list of valid
+key options.
+
+=head2 generate_pod_for_class $class_name, $view_args
+
+Returns a string containing the Pod for the class. To make sure the data is
+accurate please make sure the class has not been loaded prior to this step.
+for more info see L</"NOTICE REGARDING ROLE CONSUMPTION">
+
+=head2 generate_pod_for_role $role_name, $view_args
+
+Returns a string containing the Pod for the role.To make sure the data is
+accurate please make sure the role has not been loaded prior to this step.
+for more info see L</"NOTICE REGARDING ROLE CONSUMPTION">
+
+=head2 _class_info $class_name
+
+Will return a hashref representing the documentation components of the class
+with the keys C<name>, C<superclasses>, C<attributes>, C<methods> and,
+C<attributes>; the latter four representing array refs of the hashrefs returned
+by L</"_superclass_info">, L</"_attribute_info">, L</"_method_info">, and
+L</"_consumed_role_info">
+
+=head2 _role_info $role_name
+
+Will return a hashref representing the documentation components of the role
+with the keys C<name>, C<attributes>, C<methods> and, C<attributes>; the
+latter three representing array refs of the hashrefs returned by
+L</"_attribute_info">, L</"_method_info">, and L</"_consumed_role_info">
+
+=head2 _attribute_info $attr
+
+Accepts one argument, an attribute metaclass instance.
+Returns a hashref representing the documentation components of the
+attribute with the keys C<name>, C<description>, and C<info>, a hashref
+of additional information.
+
+=head2 _consumed_role_info $role
+
+Accepts one argument, a role metaclass instance. Returns a hashref representing
+the documentation components of the role with the key C<name>.
+
+=head2 _method_info $method
+
+Accepts one argument, a method metaclass instance. Returns a hashref
+representing the documentation components of the role with the key C<name>.
+
+=head2 _superclass_info $class
+
+Accepts one argument, the metaclass instance of a superclass. Returns a hashref
+representing the documentation components of the role with the key C<name>.
+
+=head2 meta
+
+Retrieve the metaclass instance. Please see L<Moose::Meta::Class> and
+L<Class::MOP::Class> for more information.
+
+=head1 AUTHORS
+
+Guillermo Roditi (Guillermo Roditi) <groditi@cpan.org>
+
+=head1 COPYRIGHT AND LICENSE
+This library is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.
+=cut
=over 4
[% FOREACH pair IN attribute.info.pairs %]
-=item B<[% pair.key %]> - [% pair.value %]
+=item B<[% pair.key %]> - [% pair.value %]
[% END %]
=back
[%- END; %]
sub _build_ignored_method_metaclasses {
return {
- 'Moose::Meta::Role::Method' => 1,
'Moose::Meta::Method::Accessor' => 1,
'Moose::Meta::Method::Constructor' => 1,
'Class::MOP::Method::Accessor' => 1,
'Class::MOP::Method::Constructor' => 1,
};
+# 'Moose::Meta::Role::Method' => 1,
# 'Moose::Meta::Method::Overridden' => 1,
# 'Class::MOP::Method::Wrapped' => 1,
+
}
sub _build_license_text {
# *_info methods
-sub role_info {
+sub _role_info {
my ($self, $role) = @_;
my (@roles_to_apply, $rmeta, $original_apply);
my @attributes = map{ $anon->get_attribute($_) } sort $anon->get_attribute_list;
- my %ignored_method_metaclasses = %{ $self->ignored_method_metaclasses };
- delete $ignored_method_metaclasses{'Moose::Meta::Role::Method'};
my @methods =
- grep{ ! exists $ignored_method_metaclasses{$_->meta->name} }
+ grep{ ! exists $self->ignored_method_metaclasses->{$_->meta->name} }
map { $anon->get_method($_) }
grep { $_ ne 'meta' } #it wasnt getting filtered on the anon class..
sort $anon->get_method_list;
- my @method_specs = map{ $self->method_info($_) } @methods;
- my @attribute_specs = map{ $self->attribute_info($_) } @attributes;
+ my @method_specs = map{ $self->_method_info($_) } @methods;
+ my @attribute_specs = map{ $self->_attribute_info($_) } @attributes;
{ #fix Moose::Meta::Role and apply the roles that were delayed
$rmeta->remove_method("apply");
map { $_->isa("Moose::Meta::Role::Composite") ? @{$_->get_roles} : $_ }
@{ $meta->get_roles };
- my @role_specs = map{ $self->consumed_role_info($_) } @roles;
+ my @role_specs = map{ $self->_consumed_role_info($_) } @roles;
my $spec = {
name => $meta->name,
}
-sub class_info {
+sub _class_info {
my ($self, $class) = @_;
my (@roles_to_apply, $rmeta, $original_apply);
grep { $_ ne 'meta' } #it wasnt getting filtered on the anon class..
sort $meta->get_method_list;
- my @method_specs = map{ $self->method_info($_) } @methods;
- my @attribute_specs = map{ $self->attribute_info($_) } @attributes;
- my @superclass_specs = map{ $self->superclass_info($_) } @superclasses;
+ my @method_specs = map{ $self->_method_info($_) } @methods;
+ my @attribute_specs = map{ $self->_attribute_info($_) } @attributes;
+ my @superclass_specs = map{ $self->_superclass_info($_) } @superclasses;
{ #fix Moose::Meta::Role and apply the roles that were delayed
$rmeta->remove_method("apply");
my @roles = sort{ $a->name cmp $b->name }
map { $_->isa("Moose::Meta::Role::Composite") ? @{$_->get_roles} : $_ }
@{ $meta->roles };
- my @role_specs = map{ $self->consumed_role_info($_) } @roles;
+ my @role_specs = map{ $self->_consumed_role_info($_) } @roles;
my $spec = {
name => $meta->name,
return $spec;
}
-sub attribute_info{
+sub _attribute_info{
my($self, $attr) = @_;;
my $attr_name = $attr->name;
my $spec = { name => $attr_name };
return $spec;
}
-sub superclass_info {
+sub _superclass_info {
my($self, $superclass) = @_;
my $spec = { name => $superclass->name };
return $spec;
}
-sub method_info {
+sub _method_info {
my($self, $method) = @_;
my $spec = { name => $method->name };
return $spec;
}
-sub consumed_role_info {
+sub _consumed_role_info {
my($self, $role) = @_;;
my $spec = { name => $role->name };
return $spec;
__END__;
+=head1 NAME
+
+MooseX::AutoDoc - Automatically generate documentation for Moose-based classes
+
+=head1 SYNOPSYS
+
+ use MooseX::AutoDoc;
+ my $autodoc = MooseX::AutoDoc->new
+ (
+ authors =>
+ [
+ {
+ name => "Guillermo Roditi",
+ email => 'groditi@cpan.org',
+ handle => "groditi",
+ }
+ ],
+ );
+
+ my $class_pod = $autodoc->generate_pod_for_class("MyClass");
+ my $role_pod = $autodoc->generate_pod_for_role("MyRole");
+
+=head1 DESCRIPTION
+
+MooseX::AutoDoc allows you to automatically generate POD documentation from
+your Moose based objects by introspecting them and creating a
+
+=head1 NOTICE REGARDING ROLE CONSUMPTION
+
+To accurantely detect which methods and attributes are part of the class / role
+being examined and which are part of a consumed role the
+L</"generate_pod_for_role"> and L</"generate_pod_for_class"> methods need to
+delay role consumption. If your role or class has been loaded prior to calling
+these methods you run a risk of recieving inacurate data and a warning will be
+emitted.
+
+=head1 ATTRIBUTES
+
+Unless noted otherwise, you may set any of these attributes at C<new> time by
+passing key / value pairs to C<new> where the key is the name of the attribute
+you wish to set. Unless noted otherwise accessor methods for attributes also
+share the same name as the attribute.
+
+=head2 authors
+
+=over 4
+
+=item B<predicate> - has_authors
+
+=back
+
+Optional read-write value of type
+L<ArrayRef[HashRef]|Moose::Util::TypeConstraints> representing the authors of
+the class / role being documented. These values are passed directly to the view
+and the default TT view accepts entries in the following form
+(all fields optional)
+
+ {
+ name => 'Guillermo Roditi',
+ handle => 'groditi',
+ email => '<groditi@gmail.com>',
+ }
+
+=head2 ignored_method_metaclasses
+
+=over 4
+
+=item B<builder> - _build_ignored_method_metaclasses
+
+Default to the Moose and Class::MOP method metaclasses for generated methods,
+accessors, and constructors.
+
+=item B<clearer> - clear_ignored_method_metaclasses
+
+=item B<predicate> - has_ignored_method_metaclasses
+
+=back
+
+Required read-write lazy-building value of type
+L<HashRef|Moose::Util::TypeConstraints> where the keys are method metaclasses
+MooseX::AutoDoc should ignore when creating a method list.
+
+=head2 license_text
+
+=over 4
+
+=item B<builder> - _build_license_text
+
+=item B<clearer> - clear_license_text
+
+=item B<predicate> - has_license_text
+
+=back
+
+Required read-write lazy-building value of type
+L<Str|Moose::Util::TypeConstraints>. By default it will use the following text:
+
+ This library is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
+
+=head2 tc_to_lib_map
+
+=over 4
+
+=item B<builder> - _build_tc_to_lib_map
+
+=item B<clearer> - clear_tc_to_lib_map
+
+=item B<predicate> - has_tc_to_lib_map
+
+=back
+
+Required read-write lazy-building value of type
+L<HashRef|Moose::Util::TypeConstraints>. The keys refer to type constraint
+names and the values to the module where the documentation available for that
+type is. Please note that if you are using MooseX::Types libraries the links
+will be automatically generated if the library class can be found (most cases).
+
+=head2 view
+
+=over 4
+
+=item B<builder> - _build_view
+
+Returns 'MooseX::AutoDoc::View::TT'
+
+=item B<clearer> - clear_view
+
+=item B<predicate> - has_view
+
+=back
+
+Required read-write lazy-building value of type AutoDocView. The AutoDocView
+type will accept an Object that isa L<MooseX::AutoDoc::View>. This attribute
+will attempt to coerce string values to instances by treating them as class
+names and attempting to load and instantiate a class of the same name.
+
+=head1 METHODS
+
+=head2 new $key => $value
+
+Instantiate a new object. Please refer to L</"ATTRIBUTES"> for a list of valid
+key options.
+
+=head2 generate_pod_for_class $class_name, $view_args
+
+Returns a string containing the Pod for the class. To make sure the data is
+accurate please make sure the class has not been loaded prior to this step.
+for more info see L</"NOTICE REGARDING ROLE CONSUMPTION">
+
+=head2 generate_pod_for_role $role_name, $view_args
+
+Returns a string containing the Pod for the role.To make sure the data is
+accurate please make sure the role has not been loaded prior to this step.
+for more info see L</"NOTICE REGARDING ROLE CONSUMPTION">
+
+=head2 _class_info $class_name
+
+Will return a hashref representing the documentation components of the class
+with the keys C<name>, C<superclasses>, C<attributes>, C<methods> and,
+C<attributes>; the latter four representing array refs of the hashrefs returned
+by L</"_superclass_info">, L</"_attribute_info">, L</"_method_info">, and
+L</"_consumed_role_info">
+
+=head2 _role_info $role_name
+
+Will return a hashref representing the documentation components of the role
+with the keys C<name>, C<attributes>, C<methods> and, C<attributes>; the
+latter three representing array refs of the hashrefs returned by
+L</"_attribute_info">, L</"_method_info">, and L</"_consumed_role_info">
+
+=head2 _attribute_info $attr
+
+Accepts one argument, an attribute metaclass instance.
+Returns a hashref representing the documentation components of the
+attribute with the keys C<name>, C<description>, and C<info>, a hashref
+of additional information.
+
+=head2 _consumed_role_info $role
+
+Accepts one argument, a role metaclass instance. Returns a hashref representing
+the documentation components of the role with the key C<name>.
+
+=head2 _method_info $method
+
+Accepts one argument, a method metaclass instance. Returns a hashref
+representing the documentation components of the role with the key C<name>.
+
+=head2 _superclass_info $class
+
+Accepts one argument, the metaclass instance of a superclass. Returns a hashref
+representing the documentation components of the role with the key C<name>.
+
+=head2 meta
+
+Retrieve the metaclass instance. Please see L<Moose::Meta::Class> and
+L<Class::MOP::Class> for more information.
+
+=head1 AUTHORS
+
+Guillermo Roditi (Guillermo Roditi) <groditi@cpan.org>
+
+=head1 COPYRIGHT AND LICENSE
+This library is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.
+=cut
=over 4
[% FOREACH pair IN attribute.info.pairs %]
-=item B<[% pair.key %]> - [% pair.value %]
+=item B<[% pair.key %]> - [% pair.value %]
[% END %]
=back
[%- END; %]
description => 'Optional read-only value'
};
- my $spec = $autodoc->attribute_info($attributes{attr1});
+ my $spec = $autodoc->_attribute_info($attributes{attr1});
is_deeply($spec, $target);
}
description => 'Optional read-write value of type L<HashRef|Moose::Util::TypeConstraints>'
};
- my $spec = $autodoc->attribute_info($attributes{attr2});
+ my $spec = $autodoc->_attribute_info($attributes{attr2});
is_deeply($spec, $target);
}
'description' => 'Optional read-write value of type L<ArrayRef[Str]|Moose::Util::TypeConstraints>'
};
- my $spec = $autodoc->attribute_info($attributes{attr3});
+ my $spec = $autodoc->_attribute_info($attributes{attr3});
is_deeply($spec, $target);
}
'description' => 'Required read-write value of type L<ArrayRef[Str]|Moose::Util::TypeConstraints>'
};
- my $spec = $autodoc->attribute_info($attributes{attr4});
+ my $spec = $autodoc->_attribute_info($attributes{attr4});
is_deeply($spec, $target);
}
'description' => 'Required read-write value of type L<ArrayRef[Str]|Moose::Util::TypeConstraints> that will be automatically dereferenced by the reader / accessor'
};
- my $spec = $autodoc->attribute_info($attributes{attr5});
+ my $spec = $autodoc->_attribute_info($attributes{attr5});
is_deeply($spec, $target);
}
'description' => 'Required read-write lazy-building value'
};
- my $spec = $autodoc->attribute_info($attributes{attr6});
+ my $spec = $autodoc->_attribute_info($attributes{attr6});
is_deeply($spec, $target);
}
'description' => 'Optional value'
};
- my $spec = $autodoc->attribute_info($attributes{attr7});
+ my $spec = $autodoc->_attribute_info($attributes{attr7});
is_deeply($spec, $target);
}
plan tests => 1;
my $autodoc = MooseX::AutoDoc->new;
my $attr = AutoDocTest7->meta->get_attribute("typed_attr");
-my $spec = $autodoc->attribute_info($attr);
+my $spec = $autodoc->_attribute_info($attr);
my $target = 'Optional value of type L<TestType\|AutoDocTestTypes';
like $spec->{description}, qr/$target/;
use Test::More tests => 1;
my $autodoc = MooseX::AutoDoc->new;
-my $spec = $autodoc->class_info("AutoDocTest1");
+my $spec = $autodoc->_class_info("AutoDocTest1");
#we already tested this..
delete $spec->{attributes};
use Test::More tests => 1;
my $autodoc = MooseX::AutoDoc->new;
-my $spec = $autodoc->class_info("AutoDocTest2");
+my $spec = $autodoc->_class_info("AutoDocTest2");
my $target = {
name => 'AutoDocTest2',
use Test::More tests => 1;
my $autodoc = MooseX::AutoDoc->new;
-my $spec = $autodoc->class_info("AutoDocTest3");
+my $spec = $autodoc->_class_info("AutoDocTest3");
my $target = {
name => 'AutoDocTest3',
use Test::More tests => 1;
my $autodoc = MooseX::AutoDoc->new;
-my $spec = $autodoc->class_info("AutoDocTest4");
+my $spec = $autodoc->_class_info("AutoDocTest4");
my $target = {
name => 'AutoDocTest4',
use Test::More tests => 1;
my $autodoc = MooseX::AutoDoc->new;
-my $spec = $autodoc->class_info("AutoDocTest5");
+my $spec = $autodoc->_class_info("AutoDocTest5");
my $target = {
name => 'AutoDocTest5',
use Test::More tests => 1;
my $autodoc = MooseX::AutoDoc->new;
-my $spec = $autodoc->class_info("AutoDocTest6");
+my $spec = $autodoc->_class_info("AutoDocTest6");
my $target = {
name => 'AutoDocTest6',
use Test::More tests => 1;
my $autodoc = MooseX::AutoDoc->new;
-my $spec = $autodoc->role_info("AutoDocTest::Role::Role1");
+my $spec = $autodoc->_role_info("AutoDocTest::Role::Role1");
my $target = {
name => 'AutoDocTest::Role::Role1',
use Test::More tests => 1;
my $autodoc = MooseX::AutoDoc->new;
-my $spec = $autodoc->role_info("AutoDocTest::Role::Role2");
+my $spec = $autodoc->_role_info("AutoDocTest::Role::Role2");
my $target = {
name => 'AutoDocTest::Role::Role2',
use Test::More tests => 1;
my $autodoc = MooseX::AutoDoc->new;
-my $spec = $autodoc->role_info("AutoDocTest::Role::Role3");
+my $spec = $autodoc->_role_info("AutoDocTest::Role::Role3");
my $target = {
name => 'AutoDocTest::Role::Role3',