---
name: "Biblio::SICI::Role::ValidSegment"
section: "3pm"
platform: "linux"
package: "libbiblio-sici-perl"
version: "0.04-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Biblio::SICI::Role::ValidSegment"
---

# Biblio::SICI::Role::ValidSegment(3pm)

Role to provide common validation error handling functionality to the segments

## NAME

Biblio::SICI::Role::ValidSegment - Role to provide common validation error handling functionality to the segments

## VERSION

version 0.04

## DESCRIPTION

A role that provides an attribute and some methods used for validation error handling functionality in the three SICI segments.

## ATTRIBUTES

- validationErrors

  Stores the problem reports that are gathered when any attribute is set. Do not access this directly - use the methods below.

## METHODS

- "log\_problem\_on"( STRING, ARRAYREF )

  Stores an array ref of problem descriptions for a particular attribute.

- "clear\_problem\_on"( STRING )

  Removes the problem report for a particular attribute.

- HASH "list\_problems"()

  Returns a hash structure with all error reports.

- BOOL "is\_valid"()

  Checks if any problem reports were recorded for any attribute. If yes, returns *FALSE*; otherwise, returns *TRUE*.

  Does not yet do extended verification; e.g. checking if all required data is present or if there are any conflicts within the stored SICI data!

## AUTHOR

Heiko Jansen \<hjansen@cpan.org\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Heiko Jansen.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
