Hmm. I think I did something odd in here...
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Collection / Array.pm
CommitLineData
22d869ff 1
2package MooseX::AttributeHelpers::Collection::Array;
3use Moose;
e993b282 4use MooseX::AttributeHelpers::Sugar;
5
6extends 'MooseX::AttributeHelpers::Collection';
22d869ff 7
8our $VERSION = '0.01';
9our $AUTHORITY = 'cpan:STEVAN';
10
e993b282 11define_attribute_helper (
12 helper_type => 'ArrayRef',
13 method_provider => 'MooseX::AttributeHelpers::MethodProvider::Array',
14 shortcut => 'Collection::Array',
22d869ff 15);
16
22d869ff 17no Moose;
e993b282 18no MooseX::AttributeHelpers::Sugar;
22d869ff 19
201;
21
22__END__
23
24=pod
25
26=head1 NAME
27
5431dff2 28MooseX::AttributeHelpers::Collection::Array
29
22d869ff 30=head1 SYNOPSIS
31
32 package Stuff;
33 use Moose;
5431dff2 34 use MooseX::AttributeHelpers;
22d869ff 35
36 has 'options' => (
457dc4fb 37 metaclass => 'Collection::Array',
22d869ff 38 is => 'ro',
8c651099 39 isa => 'ArrayRef[Int]',
22d869ff 40 default => sub { [] },
41 provides => {
42 'push' => 'add_options',
43 'pop' => 'remove_last_option',
44 }
45 );
46
47=head1 DESCRIPTION
48
5431dff2 49This module provides an Array attribute which provides a number of
e993b282 50array operations.
5431dff2 51
e993b282 52=head1 PROVIDED METHODS
5431dff2 53
e993b282 54The methods for this metaclass are provided by
55L<MooseX::AttributeHelpers::MethodProvider::Array>.
5431dff2 56
22d869ff 57=head1 BUGS
58
59All complex software has bugs lurking in it, and this module is no
60exception. If you find a bug please either email me, or add the bug
61to cpan-RT.
62
63=head1 AUTHOR
64
65Stevan Little E<lt>stevan@iinteractive.comE<gt>
66
67=head1 COPYRIGHT AND LICENSE
68
99c62fb8 69Copyright 2007-2008 by Infinity Interactive, Inc.
22d869ff 70
71L<http://www.iinteractive.com>
72
73This library is free software; you can redistribute it and/or modify
74it under the same terms as Perl itself.
75
8a9cea9b 76=cut