package MooseX::Privacy::Trait::Protected; use Moose::Role; around accessor_metaclass => sub { my ( $orig, $self, @rest ) = @_; return Moose::Meta::Class->create_anon_class( superclasses => [ $self->$orig(@_) ], roles => ['MooseX::Privacy::Meta::Attribute::Protected'], cache => 1 )->name; }; 1; __END__ =head1 NAME MooseX::Privacy::Trait::Protected; =head1 SYNOPSIS =head1 METHODS =head1 AUTHOR franck cuny Efranck@lumberjaph.netE =head1 SEE ALSO =head1 LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut