Ah. Unfortunately, not that sneaky after all. Consider:

{ package Test; use base qw(Class::InsideOut); sub new { bless [], shift }; my %foo : Field; };

%foo might now be tied but, since there is no way to access it, no magical attribute generation can happen :-(

Only works if you need to access the hash elsewhere in the same class - which may not always happen.


In reply to Re^4: Class::InsideOut - yet another riff on inside out objects. by adrianh
in thread Class::InsideOut - yet another riff on inside out objects. by adrianh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":