in reply to Re^2: Class::Std problem
in thread Class::Std problem

This was more along the lines of what I was looking for. I must have not made the problem clear enough because most of the posts focus upon the comparison aspect rather than the object generation.

I use Class::Std to generate new objects. However, if I am getting an object that already exists, I wanted to return the existing object, not generate a new one for comparison. So in my example, if $manager1 was this 'Manager=SCALAR(0x83ef950)' then $manager2 would return the reference.

After sleeping on it, I think that I just have to sub-class Class::Std that keeps track of all the existing objects and returns that object if it already exists.