[Dbix-class] DBIx::Class::Validation - croak's With The Validation Result..?

Skye Shaw skye.shaw at gmail.com
Wed Feb 9 03:42:59 GMT 2011


Hi,

Does anyone find it odd that DBIx::Class::Validation croaks when
validation fails via $obj->validate?

I understand the need to do this on insert & update, but it seems a
little unorthodox writing code like the following just to check the
validation result:

my $result;
eval { $result = $obj->validate };
$result = $@ if $@;

This can become (more) cumbersome if the validation involves querying the DB.



More information about the DBIx-Class mailing list