[DBIx-Class-Devel] topic/doc-replace_row_with_result

Peter Rabbitson rabbit+dbic at rabbit.us
Wed May 8 17:59:36 GMT 2013


On Wed, May 08, 2013 at 06:22:09PM +0200, Alexander Hartmaier wrote:
> After some confusion about $row->update() returns $result and if it's the
> very same object I've replaced all occurrences of $row in the docs with
> $result.
> mst and castaway agreed on IRC.
>
> ...
>
> @riba: feel free to merge the pod commit to master even if the code $row
> replacement isn't decided.

You already have the approval of not one but *two* cabal members - just 
do it, worst case scenario it will be fixed later if there are 
inconsistencies.

> 
> To make life easier for us and people reading the code I'd like to do a
> second commit that does the same thing to all code that uses $row for
> result objects, not real DBI rows like the code in the Storage namespace.

I have no rproblem with this.

> While searching lib for $row I came across $rows, for example as the return
> value of the Storage::update method. It isn't documented 

It is, in a way:
https://metacpan.org/module/DBIx::Class::ResultSet#update
https://metacpan.org/module/DBIx::Class::ResultSet#delete

> but used in code (not docs as far as I've seen). If it shouldn't be 
> publicly documented I'd like to have at least a comment near the 
> update method so it isn't knowledge that has to be remembered by 
> everybody working on the code base.

Alex, think ffs! This is what tests are for. Unfortunately we do not 
seem to have any of these, which is rather bad. It would be great if you 
can add the extra checks necessary to t/resultset/update_delete.t

Cheers



More information about the DBIx-Class-Devel mailing list