in reply to Re: Large datastructure caching
in thread Large datastructure caching

After a bit of work (not too much, this is Perl after all) just a couple of small changes to your code were required to make it work:
my $self=bless $id, $class;
becomes
my $self=bless \$id, $class;
and all references to $self as indicies to the array of handles become $$self. The calling code looks much more elegant and the internal calls are a bit better too.

rdfield

Update: I've simplified the internal calls a bit further...$self = $handles[${shift()}];and the rest of the code remains unchanged

Update 2: Blessed Scalar references are not handled very well in the serialisation of SOAP transactions, so I've had to kludge the code as follows:
Constructor:

my $self = bless {id => $id},$class;
Method:
my $self = $handles[shift()->{id}];