Poet::Util::Web(3pm)

πŸ“¦
version 0.16 Β· 2 versions
  • 0.16 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.16 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ Poet::Util::Web ✨

okay bestie, gather round πŸ’– this is the manual page for Poet::Util::Web, section 3pm of the Perl docs, and it's genuinely just a lil grab-bag of web-flavored helpers. no cap. it's giving "utility drawer in the kitchen that actually slaps." 🫢


🌸 NAME 🌸

Poet::Util::Web β€” web-related utilities. that's the whole vibe. web stuff. helpers. for you. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

here's how you pull these lil guys in, depending on where you're standing:

# In a script...
use Poet::Script qw(:web);

# In a module...
use Poet qw(:web);

# Automatically available in Mason components

so like β€” in a script? grab :web off Poet::Script. in a module? grab :web off Poet. and if you're living your best life inside a Mason component? they're just there. automatically. no import needed. main character energy fr fr πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

this whole group of utilities includes the following lil icons, and yes we're going through all of them because every single one matters:

  • html_escape ($str) β€” returns $str with HTML entities escaped/unescaped. both directions, she does both, she's versatile like that ✨
  • uri_escape ($str), uri_unescape ($str) β€” returns $str URI escaped/unescaped. this one comes straight from URI::Escape, so you know it's legit. 🌈
  • js_escape ($str) β€” returns $str escaped for Javascript. borrowed from JavaScript::Value::Escape, so it's a lil collab, we love a crossover πŸŽ€
  • make_uri ($path, $args) β€” creates a URL by combining $path with a query string formed from the hashref $args. like, it just builds it for you. obsessed. for example:
make_uri("/foo/bar", { a => 5, b => 6 });
    ==> /foo/bar?a=5&b=6

see?? $path goes in, hashref goes in, cute little query string comes out the other side. a => 5 and b => 6 become ?a=5&b=6 and honestly? that's the whole trick. iconic. πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹

  • Poet β€” yeah, the parent vibe. go look at her. πŸ’–

🌟 AUTHOR 🌟

Jonathan Swartz <swartz@pobox.com> β€” credit where credit is due, bestie, this legend wrote it 🫢


this software is copyright (c) 2012 by Jonathan Swartz.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go forth, remix, redistribute, it's all above board πŸ’…


no cap, that's genuinely the entire page. every option, every function, every path. nothing skipped. periodt. πŸ’€

and that's a wrap on this one, babe β€” this page comes to you from perl v5.34.0, dated 2022-06-18, and it's the Poet::Util::Web(3pm) man page. mwah. slay responsibly. πŸ“πŸ§š

πŸ“¦ where this page comes from