in reply to Why is the predicate method not available for a MooseX::Privacy protected attribute?
It should fail. If the attribute is protected, then it can only be accessed from within the class it was defined in, and from subclasses. Whether to do the same with delegated methods was a design decision made by the MXP authors; there are arguments in both directions, but personally I think they made the right choice. That a method is implemented by delegation is really an implementation detail; code outside the class shouldn't care.
That said, MXP doesn't really give you proper private methods. To do that, you'd need to delve into the MRO, and MXP was not ambitious enough to do that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why is the predicate method not available for a MooseX::Privacy protected attribute?
by paulymer (Novice) on Aug 31, 2013 at 22:44 UTC |