
MooseX::Privacy::Meta::Class - Meta Class for your privacy

version 0.05

Arrayref of all private attributes
my $private_attributes = $self->meta->local_private_attributes;
Arrayref of all private methods
my $private_methods = $self->meta->local_private_methods;
Add a private method to your object.
$object->meta->add_private_method('foo', sub { return 23 });
or
$object->meta->add_private_method(
'foo',
MooseX::Privacy::Meta::Method::Private->wrap(
name => 'foo',
package_name => 'Foo',
body => sub { return 23 }
)
);
Arrayref of all protected attributes
my $protected_attributes = $self->meta->local_protected_attributes;
Arrayref of all protected methods
my $private_methods = $self->meta->local_protected_methods;
Add a protected method to your object.
$object->meta->add_protected_method('foo', sub { return 23 });
or
$object->meta->add_protected_method(
'foo',
MooseX::Privacy::Meta::Method::Protected->wrap(
name => 'foo',
package_name => 'Foo',
body => sub { return 23 }
)
);

franck cuny <franck@lumberjaph.net>

This software is copyright (c) 2010 by franck cuny.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.