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

# Catmandu::Fix::Condition::exists(3pm)

only execute fixes if the path exists

## NAME

Catmandu::Fix::Condition::exists - only execute fixes if the path exists

## SYNOPSIS

```
   # uppercase the value of field 'foo' if the field 'oogly' exists
   if exists(oogly)
     upcase(foo) # foo => 'BAR'
   end
   # inverted
   unless exists(oogly)
     upcase(foo) # foo => 'bar'
   end
```

## SEE ALSO

Catmandu::Fix
