HTML::O...::Number(3)
โจ 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::XPathHTML::Object::XPath::BooleanHTML::Object::XPath::ExprHTML::Object::XPath::FunctionHTML::Object::XPath::LiteralHTML::Object::XPath::LocationPathHTML::Object::XPath::NodeSetHTML::Object::XPath::NumberHTML::Object::XPath::RootHTML::Object::XPath::StepHTML::Object::XPath::Variable
๐ COPYRIGHT & LICENSE ๐
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
- alpine 3.24: perl-html-object-doc 0.6.0-r1 ยท GPL-1.0-or-later OR Artistic-1.0-Perl
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms