DOKK / manpages / debian 12 / libmarc-spec-perl / MARC::Spec::Structure.3pm.en
MARC::Spec::Structure(3pm) User Contributed Perl Documentation MARC::Spec::Structure(3pm)

MARC::Spec::Structure - base class

    use MARC::Spec::Field;
    
    # create a new field
    my $field = MARC::Spec::Field->new('246');
    
    # field does inherit all attributes, predicates and methods
    say $field->DOES('MARC::Spec::Structure'); # 1

Is the base class for MARC::Spec::Field and MARC::Spec::Subfield.

Sets MARC::Spec::Structure::$index_start and MARC::Spec::Structure::$index_end from an index position or range.

Sets MARC::Spec::Structure::$char_start and MARC::Spec::Structure::$char_end from an character position or range.

Appends a subspec to the array of the attribute subspecs. Parameter must be an instance of 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.

True if attribute char_start has an value and false otherwise.

True if attribute char_end has an value and false otherwise.

True if attribute char_pos has an value and false otherwise.

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

Obligatory. Scalar. Normalized MARCspec without Subspecs.

If defined, the beginning character position of a character position or range.

If defined, the ending character position of a character position or range. Only present if MARC::Spec::Structure::$char_start is defined.

The difference of MARC::Spec::Structure::$char_start and MARC::Spec::Structure::$char_end if both are numeric (or else -1). Only present if MARC::Spec::Structure::$char_start is defined.

If defined, the character position or range. Only present if MARC::Spec::Structure::$char_start is defined.

Obligatory. The beginning index of field repetitions. Maybe a positiv integer or the character '#'. Default is 0.

Obligatory. The ending index of field repetitions. Maybe a positiv integer or the character '#'. Default is '#'.

Obligatory. The difference of MARC::Spec::Structure::$index_start and MARC::Spec::Structure::$index_end if both are numeric. Default is -1.

Carsten Klee "<klee at cpan.org>"

Johann Rolschewski, "<jorol at cpan>"

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.

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

  • MARC::Spec
  • MARC::Spec::Field
  • MARC::Spec::Subfield
  • MARC::Spec::Indicator
  • MARC::Spec::Subspec
  • MARC::Spec::Comparisonstring
  • MARC::Spec::Parser
2022-06-15 perl v5.34.0