XML::XPath::Number(3)

πŸ’– XML::XPath::Number πŸ’–

okay so bestie, this is XML::XPath::Number from the User Contributed Perl Documentation β€” it's a whole little class that just... holds numbers. that's it. that's the vibe. πŸŽ€


✨ NAME ✨

XML::XPath::Number β€” Simple numeric values. πŸ’…


🌸 DESCRIPTION 🌸

so this class holds simple numeric values, periodt. it's giving "just a lil number, chillin" πŸ¦‹

but ngl, there's some stuff it does not support, and the XPath spec says it should: it doesn't do -0, it doesn't do +/- Infinity, and it doesn't do NaN. 😭 the author is aware, and their whole take is, and I quote-ish, that they're not hurting anyone they don't think. πŸ™ˆ iconic honestly.


πŸ’œ API πŸ’œ

🌟 new($num)

creates a new XML::XPath::Number object, with the value in $num. 🫢

and yes, it does some rudimentary numeric checking on $num to make sure it actually is a number β€” vibe check on your input, basically. if you try to sneak a non-number in there, that's not gonna slay. ✨

🌟 value()

also works as overloaded stringification β€” so when you stringify the object, this is what you get. it returns the numeric value held. πŸ’–


πŸ’€ reminder bestie: no -0, no +/- Infinity, no NaN. the spec wanted them, this class said no. iykyk.

and that's the whole page, bestie β€” you ate that πŸ’… this was XML::XPath::Number(3) from perl v5.42.1, dated 2026-04-21. mwah, go forth and hold ur numbers πŸ‘‘ 🌈 ⭐

πŸ“¦ where this page comes from