http://qs321.pair.com?node_id=378756


in reply to How to tie variables to objects

It is the way it is. That was how the author of the 'tie' feature conceived of it being used.

(for the third time) It isn't hard to tie to an existing object. For example:

package MyClass; #... sub TieArray { my( $me, $av )= @_; tie @$av, ref($me), $me; } sub Class::TIEARRAY { return $_[1]; } package main; my $obj= MyClass->new( ... ); my @array; $obj->TieArray(\@array);

Untested and just One Way To Do It.

- tye