The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PICA::Schema::Error - Information about a PICA Schema validation

DESCRIPTION

Instances PICA::Schema::Error provide information about violation of an Avram Schema. This package should not be used directly but by using PICA::Schema.

PROPERTIES

tag

Tag of the invalid field.

occurrence

Occurrence of the invalid field (if it has an occurrence).

required

Set if the field was required but missing.

repeated

Set if the non-repeatable field was repeated.

deprecated

Set if the field is valid but deprecated.

subfields

Set to a hash reference that maps invalid subfield codes to subfield errrors.

message

human-readable error message, deriveable from the rest of the error.

SUBFIELD ERRORS

Subfields errors are given as hash references with this keys:

code

Subfield code of the invalid subfield.

required

Set if the subfield was required but missing.

repeated

Set if the non-repeatable subfield was repeated.

order

Set to the expected order value if subfield occurred in wrong order.

value

The malformed subfield value if it did not match a pattern or positions.

pattern

Pattern which the subfield value did not match.

position

The position if value did not match positions or codes.

message

human-readable error message, deriveable from the rest of the error.

METHODS

message

Returns the human readable error message. This is also returned when the error instance is used in string context.