[Dbix-class] RFC: DBIx::Class::Sweet

Carl Franks fireartist at gmail.com
Mon Apr 3 10:27:34 CEST 2006


Hi Nilson,

No comment on this module, as I haven't looked at it yet.

I just wanted to say that it's really great that you're releasing
code, but I suggest you release ideas/code to the smaller catalyst
developer community before CPAN.

An "RFC" isn't much use /after/ you've publically released the code.
It doesn't matter if it's just 0.0.1; you've released a public API.
If the RFC reveals you could have designed the API much better, do you
change it, breaking any early adopters' code if they upgrade?
And if it turns out to have not been a great idea, and you only use it
on one project, do you really want have to choose between maintaining
it, or letting people down that want new features?

Someone (can't remember who) on perlmonks suggested not releasing
something until you've used it on 3 different projects yourself. I
think that's great advice.
I hope you don't take this too negatively, I'm speaking from my own
bad experience!

Cheers,
Carl


On 03/04/06, Nilson Santos Figueiredo Junior <acid06 at gmail.com> wrote:
> Well, It's a module that adds some syntatic sugar to DBIx::Class.
> Currently, it only makes the DBIx::Class subclass "setup" easier on
> the eyes but I intend to develop it further as I see fit, maybe adding
> more substancial features.
>
> Here's what the code should look like when using it:
>
>     package World::Person;
>
>     use DBIx::Class::Sweet;
>
>     setup_class {
>
>         add_columns(qw/id name country_id/);
>         set_primary_key('id');
>         belongs_to( country => 'World::Country', 'country_id' );
>
>     };
>
> I particularly think that __PACKAGE__ is ugly as hell. So this fixes it.
>
> I had to implement some sort of hacks to make it work e struggled a
> little bit with Class::C3. So if someone could take a look at the
> source code and maybe suggest better options of achieving the same
> thing, I'd be glad.
>
> Note that in order for it to work correctly, I actually needed to do
> things such as making the caller inherit from us manually, since I
> couldn't manage to make it work with "use base 'DBIx::Class::Sweet'".
> Any thoughts on this one would be welcome.
>
> You can fetch it at:
> http://www.nilson.org/DBIx-Class-Sweet-0.01.tar.gz
>
> Or you can wait for PAUSE to stop hating me and replicate it
> throughout the mirrors (whenever I upload something to CPAN directly
> from my computer, I get some weird "nosuccesscount[0] error[...An
> Error Occurred....An Error Occurred.400 FTP return code 000..]
> (paused:638)" errors).
>
> Any suggestions or critics are welcome.
>
> I know, I know, the name is a blatant rip-off. But I just couldn't
> think of anything better right now. So if this bothers
> Class::DBI::Sweet authors, please, tell me.
>
> -Nilson Santos F. Jr.
>
> _______________________________________________
> 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