Catman...x::eval(3pm)

πŸ“¦
version 1.2025 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Catmandu::Fix::eval β€” bestie, this one evals and runs fixes that you defined inside a field ✨

It's giving "fixes inside your fixes", and honestly? iconic πŸŽ€

🌸 SYNOPSIS 🌸

    # {fixes => 'add_field(foo,bar)'}
    eval(fixes)
    # {fixes => 'add_field(foo,bar)', foo => 'bar'}

    # {fixes => ['add_field(foo,bar)','upcase(foo)'], foo => 'bar'}
    eval(fixes)
    # {fixes => ['add_field(foo,bar)','upcase(foo)'], foo => 'BAR'}

okay so the vibe check here: you hand eval a field named fixes, and it literally takes whatever fixes are chillin' in there and executes them 🫢

  • fixes is a string β†’ it's one single fix, and it runs. In the example, add_field(foo,bar) gets evaluated, and boom, foo => 'bar' shows up in your record πŸ’…
  • fixes is an array β†’ it's a whole list of fixes, and they all run, in order. In the example, add_field(foo,bar) runs and then upcase(foo) runs, so foo => 'bar' becomes foo => 'BAR' πŸ”₯

no cap, that's the whole thing. the fixes live in your data, and eval is the one that makes them happen ✨


πŸ¦‹ SEE ALSO πŸ¦‹

  • Catmandu::Fix β€” the main character, go read it πŸ‘‘

perl v5.40.1 🌈 2026-01-24 β€” and that's the tea from the Catmandu::Fix::eval(3pm) manual page, which is part of the User Contributed Perl Documentation bestie, so if you ever forget these deets they're right there at the bottom of the page πŸ’– mwah, go eval some fixes, periodt πŸ’…πŸŽ€

πŸ“¦ where this page comes from