Suppose I am creating a class with a birthyear and age field. I use the birthyear field to calculate the value of the age field.
Here is my initial arguments.
my %init_args :InitArgs =
('birthyear' => { 'Field' => \@birthyear_of }
);
Since the age field initialization is non-trivial, I have to initialize age field within an":init" subroutine. Within the ":init" subroutine, I was having trouble finding the value of the birthyear. Object::InsideOut has removed the value of the birthyear from the hash. (IMHO, this is because that value was already used to initialize birth field). And I may not get it from the field, because it doesn't look like all the initialized fields are set before Perl calls the ":init" subroutine.
I'm thinking that I can remove the 'Field' attribute from %init_args, and do the birthyear initialization manually. However, if all the implicitly initialized fields were set before calling the :init subroutine, I could still do birthyear automatically.