package Foo; sub longitudeType { # The longitude of the point. Decimal degrees, WGS84 datum. my($class, $value) = @_; return FALSE if _is_null($value); return xsd_decimal($value) and $value >= -180.0 and $value < 180.0 and TRUE; } sub fixType { my($class, $value) = @_; return FALSE if _is_null($value); return xsd_string($value) and $value eq 'none' || $value eq '2d' || $value eq '3d' || $value eq 'dgps' || $value eq 'pps' and TRUE; } 1;