perl: added class Error and error code constants