Subject: | Types serialization / deserialization |
I can't find proper way to serialize types.
I am trying to use "display_name" for serialization and eval for deserialization. But this works not for all parametrized types.
For example, StrMatch [qr/.../] can't be evaluated correctly.
Is it possible to add additional attribute, for example, serialize => sub {...}, so each type can correctly serialize yourself.
And additional Type::Tiny constructor method, than can create object from serialized value.