Skip to content

Commit

Permalink
Add stub documentation to the attribute trait
Browse files Browse the repository at this point in the history
...so author tests pass.
  • Loading branch information
rsrchboy committed May 4, 2017
1 parent 71dba24 commit 65533f6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lib/MooseX/AttributeShortcuts/Trait/Attribute.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package MooseX::AttributeShortcuts::Trait::Attribute;

# ABSTRACT: Shortcuts attribute trait proper

use namespace::autoclean;
use MooseX::Role::Parameterized;
use Moose::Util::TypeConstraints ':all';
Expand All @@ -16,6 +19,14 @@ parameter builder_prefix => (isa => NonEmptySimpleStr, default => '_build_');

with 'MooseX::AttributeShortcuts::Trait::Attribute::HasAnonBuilder';

=attr constraint
=attr original_isa
=attr trigger_method
=cut

has constraint => (
is => 'ro',
isa => 'CodeRef',
Expand Down Expand Up @@ -93,6 +104,18 @@ around _make_delegation_method => sub {
return $self->_process_accessors(custom => { $name => $custom_coderef });
};

=method mi
=method weaken_value
=method strengthen_value
=method canonical_writer_prefix
=method canonical_builder_prefix
=cut

# lazy.
sub mi { shift->associated_class->get_meta_instance }
sub weaken_value { $_[0]->mi->weaken_slot_value($_[1] => $_) for $_[0]->slots }
Expand Down

0 comments on commit 65533f6

Please sign in to comment.