[Dbix-class] Bug(?) and question

Alan Humphrey alan.humphrey at comcast.net
Wed Feb 15 17:02:36 CET 2006


Thanks.  Please do update update to be consistent.

BTW, which POD where you quoting?  It may just be me but I find it very
difficult to navigate the doc set.  Let me give you an example of my thought
process.

The code in question looked something like:

	my $dest_rs = $production->resultset( $self->_get_class_name( $obj)
);
	my $dest_obj = $dest_rs->find_or_create( $self->_get_keys($obj) );
	$dest_obj->update( $cols );

I see that $dest_obj is, in this case, a "Contributors" object.  Looking at
the definition of that I see that it inherits from DBIx::Class.  So I look
at the POD for DBIx::Class: 

http://search.cpan.org/~danieltwc/DBIx-Class-0.05005/lib/DBIx/Class.pm

Nice overview, but no listing of methods.  There is a reference to
DBIx::Class::DB which sounds promising. 

http://search.cpan.org/~danieltwc/DBIx-Class-0.05005/lib/DBIx/Class/DB.pm

That has a method listing but no "update".

Hmm.  OK, I know I'm dealing with Schemas, what does that look like?:

http://search.cpan.org/~danieltwc/DBIx-Class-0.05005/lib/DBIx/Class/Schema.p
m

Again, lots of methods, but no "update".

Okay, there's a lot of chatter these days about using result sets what does
that look like?

http://search.cpan.org/~danieltwc/DBIx-Class-0.05005/lib/DBIx/Class/ResultSe
t.pm

Hey!  There's doc for an update method!  I'll go with that.

And, it doesn't work.


After some poking around, I finally found the doc you referenced.  It's in

http://search.cpan.org/~danieltwc/DBIx-Class-0.05005/lib/DBIx/Class/Row.pm

(reached via this POD chain: DBIx::Class -> DBIx::Class::Core ->
DBIx::Class::Row)

Like I said, maybe it's just me, but having doc for a key method like
"update" buried like this makes it harder to be self sufficient.

What would have helped me?  Having the Core methods documented in
DBIx::Class, at least in a summary fashion, perhaps with pointers to more
detail.  That way I can go to one place to see what I've got available via
my DBIx::Class object.

Just a little feedback.  Thanks for a great tool!

- Alan






More information about the Dbix-class mailing list