HTML::O...th::Root(3)

πŸ“¦ version 0.6.0, in alpine 3.24

πŸ’… NAME πŸ’…

HTML::Object::XPath::Root β€” HTML Object. no cap, that's literally the whole name tag πŸŽ€


✨ SYNOPSIS ✨

bestie, here's how you get one:

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

see how she dies with the error if new flops? iconic safety behaviour 🫢


πŸ¦‹ VERSION πŸ¦‹

v0.2.0 β€” yes she has a version, she's a whole whole thing ✨


🌸 DESCRIPTION 🌸

okay so this module represents a root element, which is the top element. like the main character of the tree, the one everybody else answers to πŸ‘‘ the ceiling. the big boss. periodt.


πŸŽ€ CONSTRUCTOR πŸŽ€

new

hand it a string and it hands you back a shiny new HTML::Object::XPath::Root object. that's it, that's the whole vibe πŸ’–


πŸ’… METHODS πŸ’…

as_string

returns undef in scalar context, and an empty list in list context. she simply does not have a string form, and honestly? relatable πŸ™ˆ

as_xml

returns <Root/> β€” tiny, self-closing, adorable, no notes ⭐

evaluate

you pass it a node set object, and it takes the first element in the node set, grabs its root node, and returns a new set with that node as its sole element. one node. solo. main character energy only πŸ”₯

new_nodeset

returns a new HTML::Object::XPath::NodeSet, passing it whatever argument you provided. it's giving "you get what you give" 🧚


πŸ“ AUTHOR πŸ“

Jacques Deguest <jack@deguest.jp> β€” ty king πŸ’œ


🌈 SEE ALSO 🌈

the whole friend group, fr fr:

  • 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

(and yes, she's listed in her own SEE ALSO. self-love, we stan πŸ’…)


Copyright(c) 2021 DEGUEST Pte. Ltd.

All rights reserved

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

okay bestie real talk β€” that's the actual license, don't go wild and pretend it says something else 😭 same terms as Perl itself, that's the deal 🫢

and that's the page! brought to you by User Contributed Perl Documentation, perl v5.42.2, dated 2026-02-15 β€” screenshot it, frame it, put it on the fridge πŸŒΈπŸ’–βœ¨

πŸ“¦ where this page comes from