[Bast-commits] r9399 -
DBIx-Class/0.08/branches/try-tiny/lib/DBIx/Class/InflateColumn
tonvoon at dev.catalyst.perl.org
tonvoon at dev.catalyst.perl.org
Mon May 17 14:23:57 GMT 2010
Author: tonvoon
Date: 2010-05-17 15:23:57 +0100 (Mon, 17 May 2010)
New Revision: 9399
Modified:
DBIx-Class/0.08/branches/try-tiny/lib/DBIx/Class/InflateColumn/DateTime.pm
Log:
Fixed exception logic due to not being able to use return with a catch{}
Modified: DBIx-Class/0.08/branches/try-tiny/lib/DBIx/Class/InflateColumn/DateTime.pm
===================================================================
--- DBIx-Class/0.08/branches/try-tiny/lib/DBIx/Class/InflateColumn/DateTime.pm 2010-05-17 12:55:45 UTC (rev 9398)
+++ DBIx-Class/0.08/branches/try-tiny/lib/DBIx/Class/InflateColumn/DateTime.pm 2010-05-17 14:23:57 UTC (rev 9399)
@@ -170,10 +170,13 @@
my ($dt, $err);
try { $dt = $obj->_inflate_to_datetime( $value, \%info ) }
- catch {;
- return undef if ($undef_if_invalid);
- $self->throw_exception ("Error while inflating ${value} for ${column} on ${self}: $_");
+ catch {
+ $err = 1;
+ if (! $undef_if_invalid) {
+ $self->throw_exception ("Error while inflating ${value} for ${column} on ${self}: $_");
+ }
};
+ return undef if $err;
return $obj->_post_inflate_datetime( $dt, \%info );
},
More information about the Bast-commits
mailing list