[Dbix-class] RFC: Thoughts on a serialization format for Classes

John Napiorkowski jjn1056 at yahoo.com
Mon Jul 30 00:46:37 GMT 2007

--- Matt S Trout <dbix-class at trout.me.uk> wrote:

> On Sun, Jul 29, 2007 at 11:44:23AM -0700, 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.
> Why?
> What would this achieve for you?
> (this is not "it's a bad idea", it's "what problem
> are you intending this
> to solve")

I think the main idea is to push stuff into a
configuration file when it's not code that doing
logical work.  This way I can push down some simple
maintenance work to admins.  Also I've been playing
with MooseX::IOC lately and thinking about what makes
sense to push into a configuration for the purposes of
being able to manage my applications more easily.

To be honest I'm on the wall with this particular
idea, which is why I thought to ask the group for

I have a similar idea which honestly makes more sense
to me, which is to have a quick system to call
$schema->populate against a configuration file.  This
is actually quite easy to do, particularly now with
the new multi create logic.  Then my database deploy
scripts and tests can be easy to configure.

Another thing I was thinking this would make easier is
that the configuration files would be a little more
portable for different applications.  I already have
several apps with a basic membership system which I
typically just copy the classes.  Of course then I
have to edit them to change the package names.  I
guess you could just as easily do this with a Perl one
liner so maybe that's not a particularly strong use
case either.

There's been a push at my current job to move more
stuff into configuration and out of code.  Sometimes
it makes sense, other times it doesn't.  

Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 

More information about the Dbix-class mailing list