From f06fe87b36980cbdaaf8bdb50b1840e9700f9564 Mon Sep 17 00:00:00 2001 From: Sam Vilain Date: Mon, 23 Jun 2008 11:40:27 +1200 Subject: [PATCH] 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 { }. --- lib/CIL/Base.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5