# This test will fail because although there are args, the # args->{'limit'} test will return false since only the # value of the key[1] is being tested and not the key's # definedness itself # # [1] http://tlc.perlarchive.com/articles/perl/ug0002.shtml if ($args && $args->{limit}) { ## Lookup with limit @ids = $driver->_get_ids_limit($DB, $db, $class, $terms, $args); } # We have terms, so... elsif ($terms) { ## Lookup using index or ID if (ref($terms) eq 'HASH') { @ids = %$terms ? # We have keys so we'll munge the index and since none # of the "terms" are array references we 1) don't have # to worry about range arguments and 2) munge the @ids # listed in the index for $blogid. $driver->_get_ids_from_index($class, $terms, $args) : keys %$db; } else { @ids = $terms; } }