CGI::U...intable(3pm)

πŸ“¦
version 1.26 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– CGI::Untaint::printable πŸ’–

ok so bestie, this is CGI::Untaint::printable from the Perl docs, and no cap, it does exactly one job and it does it slayfully: it checks that a value is printable. that's it. that's the whole vibe. πŸ¦‹


✨ NAME ✨

CGI::Untaint::printable</purl> β€” validate as a printable value πŸ’…


🌸 SYNOPSIS 🌸

my $name = $handler->extract(-as_printable => 'name');

that's literally the whole thing, bestie. one line. iconic. πŸŽ€


πŸ’œ DESCRIPTION πŸ’œ

so this Input Handler right, it verifies that it's dealing with a 'printable' string. and by printable we mean characters in the range \040-\377 β€” plus \r and \n because apparently line endings get a pass too. πŸ™ˆ

and here's the lil plot twist: the empty string is taken to be printable. yep. nothing counts as printable. it's giving "everyone's welcome" energy fr fr. 🫢

ngl this is occasionally a useful 'fallback' pattern, but in general you're gonna wanna write your own patterns to be stricter. like, this one is the chill vibes version β€” if you need actual rules, you're the main character and you gotta write them yourself. no shortcuts, bestie. πŸ’€


⭐ reminder: it's a fallback, not a personality. be stricter if you need to be.

ok and that's the whole page!! this lil cutie is from perl v5.34.0, dated 2022-06-10, and it lives under the name CGI::U...intable(3pm) β€” yes the name is truncated in the docs, she's mysterious like that. πŸ’–βœ¨ go forth and validate responsibly, mwah πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from