Admittedly, I haven't looked at this module (or really tied things in general recently), but isn't there always an additional speed hit for using a tied variable? AFAIK, this hasn't been optimized away, but, as I said, I haven't kept up on the subject.
Due to the potential for "big" speed hits, I'd look at something like this as merely a stopgap to keep you from shooting yourself in the foot until you've moved over to an accessor/mutator based approach (dealer's choice as to how). Yes, yes, there's also a performance hit from using accessors vs direct hash keys, but it's usually going to be less than the hit you'd get from using a tied hashref.
That way you could drop in the tying widget to stop the bleeding now, but you slow down your system slightly. Next step is to get rid of the calls to the keys and replace 'em with accessors. Step 3 is to pull the tied hash back out and get a raise for optimizing the code, conveniently leaving out the part that you slowed it down to begin with. ;-)
In reply to Re^2: Using the strict module in object oriented programming
by jimt
in thread Using the strict module in object oriented programming
by mrguy123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |