---
name: "MARC::Spec::Indicator"
section: "3pm"
platform: "linux"
package: "libmarc-spec-perl"
version: "2.0.3-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/MARC::Spec::Indicator"
---

# MARC::Spec::Indicator(3pm)

indicator specification

## NAME

MARC::Spec::Indicator - indicator specification

## SYNOPSIS

```
    use MARC::Spec::Indicator;

    my $indicator = MARC::Spec::Indicator->new('2');
    say ref $indicator;           # MARC::Spec::Indicator
    say $field->position;         # 2
```

## DESCRIPTION

MARC::Spec::Indicator is the indicator specification of a MARC::Spec.

See MARCspec - A common MARC record path language \<http://marcspec.github.io/MARCspec/\> for further  details on the syntax.

## METHODS

### new(Str)

Create a new MARC::Spec::Indicator instance. Parameter must be a valid MARCspec indicatorPosition.

### add\_subspec(MARC::Spec::Subspec)

Appends a subspec to the array of the attribute subspecs. Parameter must be an instance of  MARC::Spec::Subspec.

### add\_subspecs(ArrayRef\[MARC::Spec::Subspec\])

Appends subspecs to the array of the attribute subspecs. Parameter must be an ArrayRef and  elements must be instances of MARC::Spec::Subspec.

### to\_string

Returns the spec as a string.

## PREDICATES

### has\_position

True if attribute position has an value and false otherwise.

### has\_subspecs

Returns true if attribute subspecs has an value and false otherwise.

## ATTRIBUTES

Some attributes are inherited from MARC::Spec::Structure.

### base

Obligatory. Scalar. The base Field spec without subspecs.

### position

Obligatory. The indicator position.

### subspecs

Optional. An array of instances of MARC::Spec::Subspec, thus all subspecs in this  array MUST be validated as a combination with the boolean 'AND', and/or an array of arrays (AoA) of instances of MARC::Spec::Subspec, thus all subspecs  in this AoA must be validated as a combination with the boolean 'OR'.

See MARC::Spec::Subspec for description of attributes of MARC::Spec::Subspec.

## AUTHOR

Carsten Klee `"<klee at cpan.org>"`

## CONTRIBUTORS

- •

  Johann Rolschewski, `"<jorol at cpan>"`

## COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Carsten Klee.

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

## BUGS

Please report any bugs to \<https://github.com/MARCspec/MARC-Spec/issues\>

## SEE ALSO

- •

  MARC::Spec

- •

  MARC::Spec::Field

- •

  MARC::Spec::Subfield

- •

  MARC::Spec::Subspec

- •

  MARC::Spec::Structure

- •

  MARC::Spec::Comparisonstring

- •

  MARC::Spec::Parser
