HTML::O...::Number(3)

๐Ÿ“ฆ version 0.6.0, in alpine 3.24

โœจ Welcome, bestie โ€” this is HTML::O...::Number(3), aka User Contributed Perl Documentation โœจ

Ok so gather round: this is the HTML::Object::XPath::Number page, and itโ€™s giving small-but-mighty numeric-value energy. No cap, itโ€™s a whole class for holding numbers in XPath land.

๐ŸŒธ NAME ๐ŸŒธ

HTML::Object::XPath::Number โ€” HTML Object XPath Number Class

๐Ÿงš SYNOPSIS ๐Ÿงš

use HTML::Object::XPath::Number;
my $num = HTML::Object::XPath::Number->new ||
    die( HTML::Object::XPath::Number->error, "\n" );

โญ VERSION โญ

v0.2.0

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

This module holds simple numeric values. It does not support -0, +/- Infinity, or NaN, even though the XPath spec says it should โ€” yes, thatโ€™s the vibe check, and itโ€™s a lilโ€™ gap ๐Ÿ˜ญ. Periodt.

๐Ÿ’… METHODS ๐Ÿ’…

๐Ÿ’– new

You hand it a "number" and it makes a fresh HTML::Object::XPath::Number object with that value in "number". It also does some rudimentary numeric checking on "number" to make sure it actually is a number. Slay.

โœจ as_string

Returns a string representation of the number, or NaN if itโ€™s undefined.

๐ŸŽ€ as_xml

Same as as_string, but in xml format.

๐Ÿ”ฅ cmp

Returns the equivalent of Perlโ€™s own cmp in perlop operation.

๐ŸŒˆ evaluate

Returns the current object. Main character energy, honestly.

๐Ÿซถ getAttributes

Returns an empty array reference in scalar context and an empty list in list context.

๐Ÿฆ‹ getChildNodes

Returns an empty array reference in scalar context and an empty list in list context.

๐Ÿ“ new_literal

Returns a new HTML::Object::XPath::Literal object, passing it whatever arguments was provided.

๐Ÿ‘‘ string_value

Returns the value of the current object by calling value.

๐Ÿ’€ to_boolean

Returns true if the current object has a true value, or false otherwise.

๐Ÿ™ˆ to_literal

Returns a new HTML::Object::XPath::Litteral object of the stringification of the current object. (Yes, Litteral is exactly what the page says โ€” iykyk.)

๐Ÿ’œ to_number

Returns the current object.

๐Ÿงฎ value

This returns the numeric value held. This is also the method used to return the value from strinfgification โ€” that spelling is on the page, bestie ๐Ÿ˜ญ.

๐ŸŒŸ AUTHOR ๐ŸŒŸ

Jacques Deguest <jack@deguest.jp>

๐Ÿ’– SEE ALSO ๐Ÿ’–

  • HTML::Object::XPath
  • HTML::Object::XPath::Boolean
  • HTML::Object::XPath::Expr
  • HTML::Object::XPath::Function
  • HTML::Object::XPath::Literal
  • HTML::Object::XPath::LocationPath
  • HTML::Object::XPath::NodeSet
  • HTML::Object::XPath::Number
  • HTML::Object::XPath::Root
  • HTML::Object::XPath::Step
  • HTML::Object::XPath::Variable

Copyright(c) 2021 DEGUEST Pte. Ltd.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


๐Ÿซถ Thatโ€™s the page, bestie! Footer tea โ˜•: source/version perl v5.42.2 ยท dated 2026-02-15 ๐Ÿ’–

๐Ÿ“ฆ where this page comes from