check Carp version with method call rather than variable