Catman...:string(3pm)
π 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 are2and1but 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
- ubuntu resolute: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms