[Dbix-class] Some patch contributions...

Brandon Black blblack at gmail.com
Fri Dec 30 21:14:05 CET 2005


On 12/30/05, Jason Kohles <email at jasonkohles.com> wrote:
> Thanks to some helpful folks and a lot of code-reading, I've managed
> to convert all of my Class::DBI code over to DBIx::Class without using
> CDBICompat.  So far I'm liking it much better (especially following
> the switch to C3, which solved some of the inheritance problems I was
> running into before.)
>
> Along the way I found some bugs, some documentation problems, and some
> stuff to contribute, which I hope you don't mind receiving all at
> once.  Not sure what format you guys prefer diffs in, let me know if
> you would prefer something other than straight 'svn diff'...
>
> Patches attached are:
>
> uuidcolumns.diff - DBIx::Class::UUIDColumns
>     DBIx::Class::UUIDColumns is fairly inefficient with it's handling
> of Data::UUID objects, creating
>     not one but two new objects for every UUID you want to create.
> This patch allows it to reuse
>     a single Data::UUID object when creating later UUIDs, and stops
> creating a new Data::UUID
>     object just to convert from a binary UUID to a string.
>
>     Quick non-scientific benchmark over 50,000 iterations:
>                            Rate          Old Way  New Way
>         Old Way   1144/s        --              -99%
>         New Way 102041/s   8822%    --
>
> cookbook-cleanup.diff - DBIx::Class::Manual::Cookbook
>     Removes an extraneous '=back' from Manual/Cookbook.pod to
> eliminate a pod parsing
>     warning, start with a blank line to prevent problems with some
> versions of various pod
>     parsers, add a SEE ALSO section pointing at the other relevant docs.
>
> loader.diff - DBIx::Class::Loader
>     Some documentation cleanup (mostly grammar and incomplete thoughts
> turned into actual
>     sentences) although some of the example code was wrong as well.
> Changed to use
>     UNIVERSAL::require instead of eval for loading the implementation
> (which makes it a bit
>     easier to read, and since DBIx::Class requires UNIVERSAL::require
> anyway, it doesn't add
>     any new dependencies).
>
> cookbook-loader.diff - DBIx::Class::Manual::Cookbook
>     My contribution to the cookbook, using DBIx::Class::Loader with
> support code for each table
>     class in external files, keeps things nice and neat, and makes it
> a little easier to mange (IMHO)
>

I'll look at the DBIx::Class::Loader stuff today, I had a couple
committed fixes in there that haven't been released anyways, probably
time for 0.11.

-- Brandon



More information about the Dbix-class mailing list