Brad Bowman wrote: > > Both Data::Dumper and Storable provide hooks to customize serialization > ($Data::Dumper::Freezer|Toaster, STORABLE_freeze|_thaw). > Other modules like YAML and Clone could also possibly reuse a > common state marshalling interface. > > Is there some common element to this process which can be gathered > into a Serialize role with a default implementation?
There is already ".yaml" to serialize to yaml and ".perl" to serialize to Perl (I'm not sure what the limits are round-tripping Perl this way). They can be returned to Perl in a consistent way, too: eval($yaml, :lang<yaml>); Still, these options may not substitute for the kind of role-based solution you have mind. Mark