in reply to Re (tilly) 1: Combined tied-array / object problem
in thread Combined tied-array / object problem

I would strongly second tilly's recommendation, and not merely so as to avoid confusion.

There are also bugs in some versions of perl that cause objects that are blessed and tied to the same class not to behave correctly. In some versions destructors are not called consistently on such objects; in others, operator overloading of tied-and-blessed objects is broken.

The problems seem to vary both from version to version, and from platform to platform. So even if your particular usage works on your particular version of perl on your particular machine, it's unlikely to be temporally or spatially portable.

I ran into this problem when I was writing Regexp::Common, and quickly decided that the three extra lines needed to implement separate tieable and blessable classes were a very small price to pay to retain my sanity. ;-)

  • Comment on Re: Re (tilly) 1: Combined tied-array / object problem