1package Net::Riak::Role::PBC::Meta;
2{
3  $Net::Riak::Role::PBC::Meta::VERSION = '0.1702';
4}
5
6use Moose::Role;
7
8sub _populate_metas {
9    my ($self, $object, $metas) = @_;
10
11    for my $meta (@$metas) {
12        $object->set_meta( $meta->key, $meta->value );
13    }
14}
15
16sub _metas_for_message {
17    my ($self, $object) = @_;
18
19    my @out;
20    while ( my ( $k, $v ) = each %{ $object->metadata } ) {
21        push @out, { key => $k, value => $v };
22    }
23    return \@out;
24
25}
26
271;
28
29__END__
30
31=pod
32
33=head1 NAME
34
35Net::Riak::Role::PBC::Meta
36
37=head1 VERSION
38
39version 0.1702
40
41=head1 AUTHOR
42
43franck cuny <franck@lumberjaph.net>, robin edwards <robin.ge@gmail.com>
44
45=head1 COPYRIGHT AND LICENSE
46
47This software is copyright (c) 2013 by linkfluence.
48
49This is free software; you can redistribute it and/or modify it under
50the same terms as the Perl 5 programming language system itself.
51
52=cut
53