Dave Howorth wrote:
> Matt S Trout wrote:
>> I think what I'd like to see is a general serialization interface that
>> plugins
>> can be written for. Something like
>>
>> __PACKAGE__->load_components(qw/Serializer/);
>> __PACKAGE__->serialization_options({ follow_rels => ... });
>>
>> ...
>>
>> $obj->serialize_to('JSON');
>> $obj->serialize_to('XML');
>>
>> etc.
>>
>> How does that look to you guys?
>
> I'm being dumb (nothing new :) This looks like a single serializer is
> loaded and it is able to serialize to multiple formats? Or are the
> 'JSON' and 'XML' just the last part of class names? With the serializers
> being loaded dynamically and sharing all the options? (though per-call
> options have also been suggested, which seems a good idea).
Single base serializer, multiple output options (probably defaulting to a
last-part-of-class-name thing), default options, default options per output
generator, per-call options as well. So to summarize -
[X] All fo the above. And a pony.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/