I designed an Moose object hierarchy that have:
- simple(scalar) attributes like name etc
- parametrized role based attributes and methods via
MooseX::Role::Parameterized
- regular Moose methods via MooseX::Method
The objects represent persistent things in the back end like but not
quite a database.
Most of the objects can be deleted from the back end via the Remove method.
This method marks the object as deleted, however the Perl object
obviously exists until out of scope.
The problem is that it still has all properties and methods and can be
operated upon.
What would be a quick way to disable (most) of its attribute and methods?
For example I would like to leave the name attribute alone, but have all
other attributes/methods throw an exception or set an error when invoked.
--
Yuri