http://www.perlmonks.org?node_id=969120


in reply to Re^2: Blessing tied hash
in thread Blessing tied hash

Thanks for your suggestion. Though I'm sure your code works so, not sure how to relate your code with what you mentioned. Does your code prove what you mentioned? 'thingy' sounds unclear for me :(
Anyway, thanks :)

Replies are listed 'Best First'.
Re^4: Blessing tied hash
by zwon (Abbot) on May 06, 2012 at 10:34 UTC

    thingy is what the reference points to, it may be hash, array, scalar, subroutine. What I'm saying, and what code demonstrates is that you can bless a hash, not just the reference as tobyink said.

      That makes sense. Although bless() requires a reference to the thingy, bless() makes the thingy blessed, not the reference itself. I didn't care this slight difference. In this context, to bless a tied hash, we pass the reference (to a tied hash) to bless().