---
name: "Catmandu::Fix::Condition::marc_spec_has"
section: "3pm"
platform: "linux"
package: "libcatmandu-marc-perl"
version: "1.320-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Fix::Condition::marc_spec_has"
---

# Catmandu::Fix::Condition::marc\_spec\_has(3pm)

Test if a MARCspec references data

## NAME

Catmandu::Fix::Condition::marc\_spec\_has - Test if a MARCspec references data

## SYNOPSIS

```
   # marc_spec_has(MARCspec)
   unless marc_spec_has('LDR{/6=\a}{/7=\a|/7=\c|/7=\d|/7=\m}')
        set_field('type','Book')
   end
```

## DESCRIPTION

Evaluate the enclosing fixes only if the MARCspec does reference data.

Does the same like  marc\_has but uses MARCspec - A common MARC record path language.

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

## METHODS

### marc\_spec\_has(MARCspec)

Evaluates to true when the MARCspec references data, false otherwise.

## SEE ALSO

- •

  Catmandu::Fix::marc\_has

- •

  Catmandu::Fix::marc\_match

- •

  Catmandu::Fix::marc\_has\_many
