A question: Why are you mixing proper method calls and procedural calls? _write() is a method, but you call it as a procedure. This means it wont be overidable in a subclass...
Well, this is my first foray into tieing, and writing classes, so basically I don't know what I'm doing here.
I've tried the return (%data) thing, and to declare the our %data;, but these don't work. But I can see that I'm over-writing globals without understanding what I'm doing and that the problem is in there somewhere. So I'm going to play around with getting rid of the glob.