[Dbix-class] RFC: Thoughts on a serialization format for Classes
Jess Robinson
castaway at desert-island.me.uk
Tue Jul 31 17:44:05 GMT 2007
On Sun, 29 Jul 2007, John Napiorkowski wrote:
> Hi,
>
> I am seriously considering writing a system to create
> DBIx Classes via a configuration file. Since the
> default for creating these classes are primarily
> package method calls I think this could be pretty
> easy.
>
> So we could replace:
>
> package myapp::Schema::foo
>
> __PACKAGE__->load_components( ... );
> __PACKAGE__table('foo');
>
> (rest of your setup)
>
> With (something like in evil YAML)
>
> Schema:
> foo:
> table: foo
> load_components:
> - comp1
> - comp2
>
>
If you didnt insist on your own formatting, you can do this fairly
trivially already, since SQL::Translator reads/has YAML, XML and various
other formats.. And someone was writing a backend for ::Schema::Loader
which would use SQL::Translator.. (hmm, who was that?)
Jess
More information about the Dbix-class
mailing list