use overload { # . . . other operators 'atan2' => sub { atan2($_[0]->numify(),$_[1]) }, # . . . the rest of them };