in reply to Re: Class::InsideOut - yet another riff on inside out objects.
in thread Class::InsideOut - yet another riff on inside out objects.
So, don't use an attributed declaration. Instead, use a syntax like: field ('name', options); that will create the underlying hash itself, rather than the caller making one.
The underlying hash can either be "hands off", or there can be a way to get to it (return value from that call?) if you really want to support it.
Being private, no access method is autogenerated, and the returned ref is the only way to get to it.{ # extra scope $xx= field qw/xx private/; sub something { # I use that instance data internally. # ... ... $$xx{$id} ... }
—John
|
---|