[Dbix-class] Row updates with parameters vs. without
Caleb Cushing
xenoterracide at gmail.com
Wed Apr 7 20:45:31 GMT 2010
On Tue, Apr 6, 2010 at 12:46 PM, Nathaniel Green <nate.green at gmail.com> wrote:
> $row->update({ attr => 'stuff', foo => 'bar', ultimate_answer => 42 });
>
There may be another reason but the latter is more readable... however
$row->update({
attr => 'stuff',
foo => 'bar',
ultimate_answer => 42,
});
that isn't less readable and it's as easy as the other to update.
where your one liner makes it a little bit harder to see changes if
you change it... and you need to diff the change.
just my 2 cents. probably more justification for the other way elsewhere.
--
Caleb Cushing
http://xenoterracide.blogspot.com
More information about the DBIx-Class
mailing list