my $pos = $thing->position; if ($pos->x == 0 and $pos->y == 0) { ...; }