Smartmatch::Sugar currently doesn't work on perl 5.10.1 and up because
of a change in smartmatching behavior: in the new behavior coderefs are
distributive over arrays and hashes, causing unexpected behavior. To
make the module work again on recent versions of perl, this patch uses
objects with '~~' overloaded instead of coderefs for all tests.