Today in a small project I need to serialize a perl class object to string in order to cache it. And when getting back the value from the cache I need to deserialize it to original class objects.
First, I tried Data::Dumper which is quite simple. But if you class object has nested reference, when deserializing you will get 'undef' for the reference. E.g., if a part of the dumped sting is like this: