I would lik e to have possibility to declare private and protected parts of class, like this:
class SomeClass {
# by default, everything is public
has 'var1' => ( isa => 'Num', is => 'rw', default => 0 );
method sub1 (Num $arg) { .... }
private {
has 'var2' => ( isa => 'Num', is => 'rw', default => 0 );
method sub2 (Num $arg) { .... }
}
protected {
has 'var3' => ( isa => 'Num', is => 'rw', default => 0 );
method sub3 (Num $arg) { .... }
}
}
Or like this:
class SomeClass {
# by default, everything is public
has 'var1' => ( isa => 'Num', is => 'rw', default => 0 );
method sub1 (Num $arg) { .... }
private has 'var2' => ( isa => 'Num', is => 'rw', default => 0 );
private method sub2 (Num $arg) { .... }
protected has 'var3' => ( isa => 'Num', is => 'rw', default => 0 );
protected method sub3 (Num $arg) { .... }
}
Or even combination of both possibilities :)
Would you like to make such extension?
I can try to help, but I'm far away yet from MooseX::Declare internal magic :(
I would lik e to have possibility to declare private and protected parts of class, like this:
Or like this:
Or even combination of both possibilities :)
Would you like to make such extension?
I can try to help, but I'm far away yet from MooseX::Declare internal magic :(