From: Sam Vilain Date: Sun, 22 Jun 2008 23:40:27 +0000 (+1200) Subject: Workaround for older versions of DateTime X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f06fe87b36980cbdaaf8bdb50b1840e9700f9564;p=cil.git Workaround for older versions of DateTime Older versions of DateTime blow up if you try to compare them to anything - even just testing equality they will raise an exception. So, guard this comparison in an eval { }. --- diff --git a/lib/CIL/Base.pm b/lib/CIL/Base.pm index f90dcca..ed5c3a8 100644 --- a/lib/CIL/Base.pm +++ b/lib/CIL/Base.pm @@ -125,7 +125,7 @@ sub set { # finish if both are defined and they're the same if ( defined $orig and defined $value ) { - return if $orig eq $value + return if eval { $orig eq $value }; } # finish if neither are defined