Catman...d::run(3pm)

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

🌸 NAME 🌸

Catmandu::Cmd::run β€” bestie, this is the one that runs a fix command. That's it, that's the whole job. πŸ’…

Okay so this little page lives in the User Contributed Perl Documentation section, and its manual name is Catman...d::run(3pm) β€” yes the name is a whole vibe, we don't ask questions, we just run the fixes. πŸ¦‹


✨ EXAMPLES ✨

Fr fr, examples are where it's at. Here's every single one, exactly as written:

πŸŽ€ Run an interactive Fix shell

# Run an interactive Fix shell
$ catmandu run

Just catmandu run with nothing after it? Boom, you're in an interactive Fix shell. Main character energy. πŸ‘‘

πŸ’– Execute the fix script

# Execute the fix script
$ catmandu run myfixes.txt

Hand it a file and it executes that fix script. Simple, iconic, no notes.

🌈 Execute the scripts with options passed

# Execute the scripts with options passed
$ catmandu run --var source=bla myfixes.txt
$ cat myfixes.txt
add_field(my_source,{{source}})

See that --var source=bla? That's you passing options in, and then myfixes.txt itself contains add_field(my_source,{{source}}). The {{source}} gets filled in from the variable you passed. It's giving templating, and we're obsessed. ✨

🧚 Or create an execurable fix script:

Not a typo on my part bestie β€” the original literally says execurable and I am not about to edit the source of truth. Copy it exactly if you're copying it. 😭
# Or create an execurable fix script:

#!/usr/bin/env catmandu run
do importer(Mock,size:10)
  add_field(foo,bar)
  add_to_exporter(.,JSON)
end

The shebang line #!/usr/bin/env catmandu run turns the whole file into something you can just execute, and inside it you get do importer(Mock,size:10), add_field(foo,bar) and add_to_exporter(.,JSON) wrapped in do … end. Ate. πŸ”₯


Sign-off szn 🫢 β€” this page is from perl v5.40.1, dated 2026-01-24, and it belongs to the Catman...d::run(3pm) manual. Go run some fixes, bestie. Periodt. πŸ’œ

πŸ“¦ where this page comes from