diff options
author | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2011-11-24 18:00:02 +0000 |
---|---|---|
committer | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2011-11-24 18:00:02 +0000 |
commit | cc3e04eb59c2dc6cf17e7bf1387ab4dbc8e006ff (patch) | |
tree | e959de807bff98ebbaeeb0262d084efcc2e27666 /lib/Data/MultiValued.pod | |
parent | Build results of 008e42d (on master) (diff) | |
parent | make PAUSE life easier (diff) | |
download | data-multivalued-cc3e04eb59c2dc6cf17e7bf1387ab4dbc8e006ff.tar.gz data-multivalued-cc3e04eb59c2dc6cf17e7bf1387ab4dbc8e006ff.tar.bz2 data-multivalued-cc3e04eb59c2dc6cf17e7bf1387ab4dbc8e006ff.zip |
Build results of 6e5e90b (on master)
Diffstat (limited to 'lib/Data/MultiValued.pod')
-rw-r--r-- | lib/Data/MultiValued.pod | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/lib/Data/MultiValued.pod b/lib/Data/MultiValued.pod deleted file mode 100644 index e898ad1..0000000 --- a/lib/Data/MultiValued.pod +++ /dev/null @@ -1,95 +0,0 @@ -# PODNAME: Data::MultiValued -# ABSTRACT: store tag- and range-dependant data in a scalar or Moose attribute - - -__END__ -=pod - -=head1 NAME - -Data::MultiValued - store tag- and range-dependant data in a scalar or Moose attribute - -=head1 VERSION - -version 0.0.1_1 - -=head1 SYNOPSIS - - use Data::MultiValued::Tags; - - my $obj = Data::MultiValued::Tags->new(); - $obj->set({ - tag => 'tag1', - value => 'a string', - }); - say $obj->get({tag=>'tag1'}); # prints 'a string' - say $obj->get({tag=>'tag2'}); # dies - -Also: - - package My::Class; - use Moose; - use Data::MultiValued::AttributeTrait::Tags; - - has stuff => ( - is => 'rw', - isa => 'Int', - traits => ['MultiValued::Tags'], - ); - - # later - - my $obj = My::Class->new(); - $obj->stuff_multi({tag=>'tag1'},123); - say $obj->stuff_multi({tag=>'tag1'}); # prints 123 - -=head1 DESCRIPTION - -This set of classes allows you to store different values inside a -single object, and access them by tag and / or by a numeric value. - -Yes, you could do the same with hashes and some clever use of -arrays. Or you could use L<Array::IntSpan>. Or some other CPAN -module. Why use these? - -=over 4 - -=item * - -they are optimised for serialisation, see -L<Data::MultiValued::UglySerializationHelperRole> and F<t/json.t>. - -=item * - -you get accessors generated for your Moose attributes just by setting -a trait - -=item * - -tags and ranges interact in sensible ways, including clearing ranges - -=back - -=head1 Where to go from here - -Look at the tests for detailed examples of usage. Look at -L<Data::MultiValued::Tags>, L<Data::MultiValued::Ranges> and -L<Data::MultiValued::TagsAndRanges> for the containers -themselves. Look at L<Data::MultiValued::AttributeTrait::Tags>, -L<Data::MultiValued::AttributeTrait::Ranges> and -L<Data::MultiValued::AttributeTrait::TagsAndRanges> for the Moose -attribute traits. - -=head1 AUTHOR - -Gianni Ceccarelli <dakkar@thenautilus.net> - -=head1 COPYRIGHT AND LICENSE - -This software is copyright (c) 2011 by Net-a-porter.com. - -This is free software; you can redistribute it and/or modify it under -the same terms as the Perl 5 programming language system itself. - -=cut - |