[Dbix-class] RFC: Syntactic sugar

Zbigniew Lukasiak zzbbyy at gmail.com
Thu Mar 30 08:54:15 CEST 2006


Hmm, when you ask that question how about:

my @rows = $schema->select ( bar => 'baz', { table => 'foo' } );

?

-- Zbyszek

On 3/29/06, Brandon Black <blblack at gmail.com> wrote:
> On 3/29/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> > Somebody posted a proposal (and an evil Want hack as a possible
> > implementation) for a neat bit of syntax, but (1) it's attached to an old
> > thread, (2) it didn't particularly define what the syntax would do.
> >
> > But it's got me thinking about extra sugar again; we've now mostly got a core
> > I'm happy to see serious sugar built on top of (all automagic and no
> > primitives to fall back to was one of my great problems customising CDBI,
> > hence my worrying about getting the basics right more than anything else
> > recently).
> >
> > So, what things are you doing with DBIx::Class that works but where the syntax
> > is clumsier or more verbose than they'd like, and what would your ideal
> > interface to these things be? Lets get a discussion going (but stick to
> > syntax, not implementation please; we'll figure out how to implement it once
> > we've decided what we're actually trying to implement :)
> >
>
> package Foo::Schema;
> use base qw/DBIx::Class::Schema/;
>
> __PACKAGE__->declare( ... );
>
> 1;
>
> Where ... could be a data structure, a string, a filehandle, a
> filename, or undef to read from __DATA__
>
> Or could even make a special subclass of Schema called
> DBIx::Class::Schema::Declarative, that uses a source-filter (5.8.0+
> only IIRC) to interpret the whole rest of the file as our invented
> declarative syntax.
>
> -- Brandon
>
> _______________________________________________
> 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/
>


More information about the Dbix-class mailing list