From: Peter Rabbitson Date: Thu, 23 Jan 2014 14:52:21 +0000 (+0100) Subject: Clarify is_exception(undef) behavior missed in 841efcb3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a04141382e5dc37ab58323870c2efedf3851b89e;p=dbsrgits%2FDBIx-Class-Historic.git Clarify is_exception(undef) behavior missed in 841efcb3 --- diff --git a/lib/DBIx/Class/_Util.pm b/lib/DBIx/Class/_Util.pm index 60e0409..3e3b68f 100644 --- a/lib/DBIx/Class/_Util.pm +++ b/lib/DBIx/Class/_Util.pm @@ -83,6 +83,12 @@ sub refcount ($) { sub is_exception ($) { my $e = $_[0]; + # this is not strictly correct - an eval setting $@ to undef + # is *not* the same as an eval setting $@ to '' + # but for the sake of simplicity assume the following for + # the time being + return 0 unless defined $e; + my ($not_blank, $suberror); { local $@;