From: Dave Rolsky Date: Sun, 3 Jan 2010 16:44:17 +0000 (-0600) Subject: Add minimal pod to mixin classes, add versions, and update pod spelling ... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c871d3eac7cc21ad8dbe6169100feb0514dc4837;p=gitmo%2FClass-MOP.git Add minimal pod to mixin classes, add versions, and update pod spelling & coverage tests --- diff --git a/lib/Class/MOP/Mixin.pm b/lib/Class/MOP/Mixin.pm index b7c20d1..bcb5ac3 100644 --- a/lib/Class/MOP/Mixin.pm +++ b/lib/Class/MOP/Mixin.pm @@ -3,6 +3,10 @@ package Class::MOP::Mixin; use strict; use warnings; +our $VERSION = '0.97'; +$VERSION = eval $VERSION; +our $AUTHORITY = 'cpan:STEVAN'; + use Scalar::Util 'blessed'; sub meta { @@ -11,3 +15,42 @@ sub meta { } 1; + +__END__ + +=pod + +=head1 NAME + +Class::MOP::Mixin - Base class for mixin classes + +=head1 DESCRIPTION + +This class provides a single method shared by all mixins + +=head1 METHODS + +This class provides a few methods which are useful in all metaclasses. + +=over 4 + +=item B<< Class::MOP::Mixin->meta >> + +This returns a L object for the mixin class. + +=back + +=head1 AUTHORS + +Dave Rolsky Eautarch@urth.orgE + +=head1 COPYRIGHT AND LICENSE + +Copyright 2006-2009 by Infinity Interactive, Inc. + +L + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut diff --git a/lib/Class/MOP/Mixin/AttributeCore.pm b/lib/Class/MOP/Mixin/AttributeCore.pm index 4f47112..f666f3f 100644 --- a/lib/Class/MOP/Mixin/AttributeCore.pm +++ b/lib/Class/MOP/Mixin/AttributeCore.pm @@ -3,12 +3,12 @@ package Class::MOP::Mixin::AttributeCore; use strict; use warnings; -use Scalar::Util 'blessed'; - -our $VERSION = '0.97'; +our $VERSION = '0.97'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; +use Scalar::Util 'blessed'; + use base 'Class::MOP::Mixin'; sub has_accessor { defined $_[0]->{'accessor'} } @@ -60,3 +60,31 @@ sub default { } 1; + +__END__ + +=pod + +=head1 NAME + +Class::MOP::Mixin::AttributeCore - Core attributes shared by attribute metaclasses + +=head1 DESCRIPTION + +This class implements the core attributes (aka properties) shared by all +attributes. See the L documentation for API details. + +=head1 AUTHORS + +Dave Rolsky Eautarch@urth.orgE + +=head1 COPYRIGHT AND LICENSE + +Copyright 2006-2009 by Infinity Interactive, Inc. + +L + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut diff --git a/lib/Class/MOP/Mixin/HasAttributes.pm b/lib/Class/MOP/Mixin/HasAttributes.pm index d56c629..9f4c55d 100644 --- a/lib/Class/MOP/Mixin/HasAttributes.pm +++ b/lib/Class/MOP/Mixin/HasAttributes.pm @@ -3,6 +3,10 @@ package Class::MOP::Mixin::HasAttributes; use strict; use warnings; +our $VERSION = '0.97'; +$VERSION = eval $VERSION; +our $AUTHORITY = 'cpan:STEVAN'; + use Carp 'confess'; use Scalar::Util 'blessed'; @@ -82,3 +86,32 @@ sub get_attribute_list { } 1; + +__END__ + +=pod + +=head1 NAME + +Class::MOP::Mixin::HasMethods - Methods for metaclasses which have attributes + +=head1 DESCRIPTION + +This class implements methods for metaclasses which have attributes +(L and L). See L for +API details. + +=head1 AUTHORS + +Dave Rolsky Eautarch@urth.orgE + +=head1 COPYRIGHT AND LICENSE + +Copyright 2006-2009 by Infinity Interactive, Inc. + +L + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut diff --git a/lib/Class/MOP/Mixin/HasMethods.pm b/lib/Class/MOP/Mixin/HasMethods.pm index 82abbcc..e8eb4c7 100644 --- a/lib/Class/MOP/Mixin/HasMethods.pm +++ b/lib/Class/MOP/Mixin/HasMethods.pm @@ -3,6 +3,10 @@ package Class::MOP::Mixin::HasMethods; use strict; use warnings; +our $VERSION = '0.97'; +$VERSION = eval $VERSION; +our $AUTHORITY = 'cpan:STEVAN'; + use Scalar::Util 'blessed'; use Carp 'confess'; use Sub::Name 'subname'; @@ -148,3 +152,32 @@ sub get_method_list { } 1; + +__END__ + +=pod + +=head1 NAME + +Class::MOP::Mixin::HasMethods - Methods for metaclasses which have methods + +=head1 DESCRIPTION + +This class implements methods for metaclasses which have methods +(L and L). See L +for API details. + +=head1 AUTHORS + +Dave Rolsky Eautarch@urth.orgE + +=head1 COPYRIGHT AND LICENSE + +Copyright 2006-2009 by Infinity Interactive, Inc. + +L + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself. + +=cut diff --git a/xt/author/pod_coverage.t b/xt/author/pod_coverage.t index bf1daf1..bb4c6c6 100644 --- a/xt/author/pod_coverage.t +++ b/xt/author/pod_coverage.t @@ -17,7 +17,6 @@ my %trustme = ( 'Class::MOP' => [ 'HAVE_ISAREV', 'subname', 'in_global_destruction' ], 'Class::MOP::Attribute' => ['process_accessors'], 'Class::MOP::Class' => [ - # deprecated 'alias_method', 'compute_all_applicable_attributes', @@ -50,8 +49,7 @@ my %trustme = ( 'Class::MOP::Class::Immutable::Trait' => ['.+'], 'Class::MOP::Class::Immutable::Class::MOP::Class' => ['.+'], 'Class::MOP::Deprecated' => ['.+'], - - 'Class::MOP::Instance' => [ + 'Class::MOP::Instance' => [ qw( BUILDARGS bless_instance_structure is_dependent_on_superclasses ), @@ -91,7 +89,10 @@ my %trustme = ( initialize_body ) ], - 'Class::MOP::Module' => ['create'], + 'Class::MOP::Mixin::AttributeCore' => ['.+'], + 'Class::MOP::Mixin::HasAttributes' => ['.+'], + 'Class::MOP::Mixin::HasMethods' => ['.+'], + 'Class::MOP::Module' => ['create'], 'Class::MOP::Package' => [ 'get_method_map', 'wrap_method_body' ], ); diff --git a/xt/author/pod_spell.t b/xt/author/pod_spell.t index 233e308..f3f5b21 100644 --- a/xt/author/pod_spell.t +++ b/xt/author/pod_spell.t @@ -113,6 +113,8 @@ IRC isa login metadata +mixin +mixins munge namespace namespaced