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

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

comparison string specification

## NAME

MARC::Spec::Comparisonstring - comparison string specification

## SYNOPSIS

```
    use MARC::Spec;

    my $ms = MARC::Spec->new('245{$a~\marc});
    say ref $ms->field->subspecs->[0]->rightSubTerm;  # MARC::Spec::Comparisonstring
```

## DESCRIPTION

MARC::Spec::Comparisonstring is the comparison string 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

Create a new MARC::Spec::Comparisonstring instance.

### to\_string

Returns the spec as a string.

## ATTRIBUTES

### raw

Obligatory. The raw comparison string with escaped characters.

### comparable

Obligatory. The comparison string without the escaping "\\".

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