Catmandu::Fix::Bind::with(3pm)

Catmandu::Fix::Bind::with3pm

A binder that computes fix-es in the context of a path

Usage

     # Input data
     data:
     - name: patrick
     - name: nicolas
    # Fix
    do with(path:data)
        if all_match(name,nicolas)
            reject()
        end
    end
    # will produce
    data:
     - name: patrick

Overview

The "with" bind allows to run fixes in the scope of a path.

Given a deep nested data structure :

    my:
      deep:
        field:
           name: James Brown

these two fixes are equal:

    add_field(my.deep.field.style, funk)
    do with(path:my.deep.field)
        add_field(style,funk)
    end

Configuration

path

The path to a list in the data.

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

From libcatmandu-perl 1.2024-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.