[Dbix-class] Some patch contributions...
Matt S Trout
dbix-class at trout.me.uk
Sat Dec 31 19:18:19 CET 2005
On Fri, Dec 30, 2005 at 02:13:24PM -0500, Jason Kohles 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% --
Hmm, CL Kao contributed UUIDColuns - could you lob the patch at him and
get him to check it (seems obvious to me but still worth doing).
> 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.
> 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)
Do these patch cleanly against branches/DBIx-Class-resultset ?
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list