I cannot see any obstacle and drawback if these hash structures are replaced with single hash reference
I can.
- It's far more likely that you are using more objects than attributes. Your solution uses a hash per class per object, while the inside-out solution uses a hash per attribute. So, if you have 1,000 objects of a class hierarchy of 5 classes, using 20 attributes in total, your solution uses 5,000 hashes. The inside-out technique uses 20.
- Your solution uses strings to store variables. Which gives you all the drawbacks of using symbolic references. It's even worse than using package variables, as there's a decent chance that 'use warnings' catches a typo in a package variable - but neither 'use warnings', nor 'use strict' will catch a typo in a hash key. The inside-out technique uses lexical variables only, giving you all the benefits of 'use strict'.
These are drawbacks. It doesn't mean your solution (which is a known technique, often called 'fly-weight objects') doesn't work.