Catman...:string(3pm)

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

πŸ’– Catmandu::Fix::string β€” the manual page, but make it cute πŸ’–

okay bestie, gather round 🫢 you've stumbled into the docs for Catmandu::Fix::string, which is exactly what it sounds like: it takes a value and turns it into a string. no cap. that's the whole job. it's giving "one tiny Fix, infinite peace". ✨


🌸 NAME 🌸

Catmandu::Fix::string β€” convert a value to a string πŸ’…

literally. that's the name. that's the function. we love a concise queen.


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole vibe, verbatim, no edits, because the examples ARE the tea β˜•:

# year => 2016
string(year)
# year => "2016"

# foo => ["a", "b", "c"]
string(foo)
# foo => "abc"

# foo => ["a", {b => "c"}, "d"]
string(foo)
# foo => ""

# foo => {2 => "b", 1 => "a"}
string(foo)
# foo => "ab"

# foo => {a => ["b"]}
string(foo)
# foo => ""

okay let's walk through it because this is lowkey fascinating πŸ‘€

  • a plain number like 2016? turns into the string "2016". iconic, expected, slay. ✨
  • a list of plain strings like ["a", "b", "c"]? squishes into "abc". it's giving friendship bracelet. πŸŽ€
  • a list with anything weird in it, like ["a", {b => "c"}, "d"]? nope. you get "". empty. nothing. it said "not my problem". πŸ’€
  • a hash {2 => "b", 1 => "a"}? you get "ab" β€” and notice the keys are 2 and 1 but the output is "ab", so it's not just running in the order you typed them. bestie that's a real detail, don't @ me.
  • a hash where the value is a list, like {a => ["b"]}? again "". πŸ™ˆ empty string, thanks for playing.
⚠️ heads up bestie: the "nested stuff gives you an empty string" thing is a genuine gotcha. if your data has hashes-inside-arrays or arrays-inside-hashes, this Fix will hand you "" and you'll be sitting there like 😭. that's just how it is. no guessing beyond what's written here, fr fr.

πŸ‘‘ SEE ALSO πŸ‘‘

  • Catmandu::Fix β€” the mothership πŸš€ go read it, iykyk

that's the whole page, bestie. short, sweet, and honestly? it ate. πŸ’…

this absolute gem of a doc came to you via perl v5.40.1, dated 2026-01-24, and it's part of the User Contributed Perl Documentation crew. mwah. 😘 πŸ’–

πŸ“¦ where this page comes from