if the $attr below is confusing, see http://search.cpan.org/~ribasushi/DBIx-Class-0.08120/lib/DBIx/Class/ResultSet.pm#ATTRIBUTES