---
name: "MARC::Spec::Parser"
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::Parser"
---

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

parses a MARCspec as string

## NAME

MARC::Spec::Parser - parses a MARCspec as string

## SYNOPSIS

```
    use MARC::Spec::Parser;

    my $parser = MARC::Spec::Parser->new('245$a');

    my $ms = $parser->marcspec;
    say ref $ms; # MARC::Spec
```

## DESCRIPTION

MARC::Spec::Parser parses a MARCspec as string into a MARC::Spec. MARC::Spec is a MARCspec - A common MARC record path language \<http://marcspec.github.io/MARCspec/\> parser and validator.

## METHODS

### new(Str)

Create a new MARC::Spec::Parser instance. Parameter must be a  MARCspec as string.

## ATTRIBUTES

### spec

Obligatory. The parameter string the MARC::Spec::Parser was instantiated with.

### marcspec

Instance of MARC::Spec.

## 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::Indicator

- •

  MARC::Spec::Subspec

- •

  MARC::Spec::Structure

- •

  MARC::Spec::Comparisonstring
