I was trying to serialize some (Moose) objects with YAML
-- simply by using YAML's Dump()
and Load()
. After loading a serialized object, it didn't 'work' until I added a use
statement with the original module name. If I don't use use
I won't get any error until I try to invoke some object method, then it will croak saying it can't find this method.
I thought loading the needed classes is part of the de-serializer job, and if I'm not mistaken Storable
indeed does it by itself.So is there anything broken with YAML?
Also, I noticed the version of the module is not stored with the serialized object. Any way to add it?