From: Yuval Kogman Date: Thu, 21 Aug 2008 10:53:42 +0000 (+0000) Subject: XOR reads more clearly to me than ?: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=709b5ad42dc0e7f947f751bc6859a67dedd5aa80;p=gitmo%2FMoose.git XOR reads more clearly to me than ?: --- diff --git a/Moose.xs b/Moose.xs index 9944abd..5f6e37c 100644 --- a/Moose.xs +++ b/Moose.xs @@ -469,7 +469,7 @@ STATIC bool check_sv_type (TC type, SV *sv) { if ( sv_isobject(sv) ) { char *name = HvNAME_get(SvSTASH(SvRV(sv))); bool is_regexp = strEQ("Regexp", name); - return ( type == RegexpRef ? is_regexp : !is_regexp ); + return ( (type == RegexpRef) ^ !is_regexp ); } return 0; break;