1package Net::Riak::Role::PBC::Link; 2{ 3 $Net::Riak::Role::PBC::Link::VERSION = '0.1702'; 4} 5use Moose::Role; 6use Net::Riak::Link; 7use Net::Riak::Bucket; 8 9sub _populate_links { 10 my ($self, $object, $links) = @_; 11 12 for my $link (@$links) { 13 my $l = Net::Riak::Link->new( 14 bucket => Net::Riak::Bucket->new( 15 name => $link->bucket, 16 client => $self 17 ), 18 key => $link->key, 19 tag => $link->tag 20 ); 21 $object->add_link($l); 22 } 23} 24 25sub _links_for_message { 26 my ($self, $object) = @_; 27 28 return [ 29 map { { 30 tag => $_->tag, 31 key => $_->key, 32 bucket => $_->bucket->name 33 } 34 } $object->all_links 35 ] 36} 37 381; 39 40__END__ 41 42=pod 43 44=head1 NAME 45 46Net::Riak::Role::PBC::Link 47 48=head1 VERSION 49 50version 0.1702 51 52=head1 AUTHOR 53 54franck cuny <franck@lumberjaph.net>, robin edwards <robin.ge@gmail.com> 55 56=head1 COPYRIGHT AND LICENSE 57 58This software is copyright (c) 2013 by linkfluence. 59 60This is free software; you can redistribute it and/or modify it under 61the same terms as the Perl 5 programming language system itself. 62 63=cut 64