Tree::...:Number(3pm)

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

πŸ’– NAME πŸ’–

Tree::XPathEngine::Number β€” literally just simple numeric values, bestie. That's the whole gig. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this class is a lil container that holds simple numeric values. that's it. that's the vibe. πŸŽ€

but ngl, there's some tea: it does not support -0, +/- Infinity, or NaN β€” even though the XPath spec says it should. lowkey a whole gap in the implementation πŸ’€. the author's take tho? "I'm not hurting anyone I don't think." and honestly? valid. iconic energy. πŸ™ˆ


🌈 API 🌈

✨ new($num) ✨

Makes you a fresh new Tree::XPathEngine::Number object, holding whatever value you put in $num. 🫢

It also does some rudimentary numeric checking on $num first, just to make sure it's actually a number and you're not out here passing it nonsense. vibe check complete. πŸ’…

✨ value() ✨

Also known as the overloaded stringification. It hands back the numeric value it's holding. simple, clean, ate. πŸ‘‘

✨ Other Methods ✨

These ones exist purely so the objects can get properly processed in various contexts. they're the backstage crew fr fr 🧚

  • as_string
  • as_xml
  • value
  • xpath_cmp
  • evaluate
  • xpath_to_boolean
  • xpath_to_literal
  • xpath_to_number
  • xpath_string_value

reminder bestie: no -0, no +/- Infinity, no NaN. if you need those, this is not the class for you, and that's just how it is. 😭

perl v5.36.0 Β· 2022-11-20 Β· User Contributed Perl Documentation

and that's the whole page, bestie!! πŸ’–βœ¨ this doc dropped on 2022-11-20, came from the User Contributed Perl Documentation crew, and was blessed by perl v5.36.0. slay, mwah, go forth and hold your numbers. πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from