Subject: | Suggestion for hook enhancement |
Hello,
I would like to see two features:
1) If the object is of unsupported type, it should be saved as it's classname. Plus, of course, whatever it's hook returns.
2) If the thawing hook returns something, it should be used instead of it's original argument.
Now this would not break existing code (known reference-types are still serialized like they always were) and it would allow any kind of object to be stored. That is, it would allow storing objects based on GLOB, FORMAT and IO objects (semantics is not provided, but it's now possible to provide it in the application), greatly simplify serialization of foreign objects (you can just call constructor) and allow tricks with merging references (as another wishlist requests).