1package Net::Riak::Role::Replica; 2{ 3 $Net::Riak::Role::Replica::VERSION = '0.1702'; 4} 5 6use MooseX::Role::Parameterized; 7 8parameter keys => ( 9 isa => 'ArrayRef', 10 required => 1, 11); 12 13role { 14 my $p = shift; 15 16 my $keys = $p->keys; 17 18 foreach my $k (@$keys) { 19 has $k => ( 20 is => 'rw', 21 isa => 'Int', 22 lazy => 1, 23 default => sub { (shift)->client->$k } 24 ); 25 } 26}; 27 281; 29 30__END__ 31 32=pod 33 34=head1 NAME 35 36Net::Riak::Role::Replica 37 38=head1 VERSION 39 40version 0.1702 41 42=head1 AUTHOR 43 44franck cuny <franck@lumberjaph.net>, robin edwards <robin.ge@gmail.com> 45 46=head1 COPYRIGHT AND LICENSE 47 48This software is copyright (c) 2013 by linkfluence. 49 50This is free software; you can redistribute it and/or modify it under 51the same terms as the Perl 5 programming language system itself. 52 53=cut 54