HTML::...at_Rel(3pm)

πŸ’– HTML::...at_Rel β€” bestie edition πŸ’–

ok so real talk, this page is HTML::...at_Rel(3pm), and it lives in the User Contributed Perl Documentation manual, section 3pm. buckle up buttercup, it's a short one but it's iconic πŸ’…


✨ NAME ✨

HTML::Microformats::Format_Rel β€” the base rel-* microformat class πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

ok so here's the vibe, literally copy-paste this and you're cooking:

my @tags = HTML::Microformats::RelTag->extract_all(
                  $doc->documentElement, $context);
foreach my $tag (@tags)
{
  print $tag->get_href . "\n";
}

like, you extract all the tags, then you loop over them and print each one's href. simple as. periodt πŸ’…

🌸 DESCRIPTION 🌸

so HTML::Microformats::Format_Rel inherits from HTML::Microformats::Format. and bestie, if you wanna know about the property getter/setter methods, the constructors, all that good stuff β€” that's all described in the base class definition. go read that one, it's giving lore πŸ“š

πŸ‘‘ Additional Methods πŸ‘‘

here's the extra stuff this class brings to the table, no cap:

  • $relfoo->get_href() β€” hands you the absolute URL of the resource that's being linked to. absolute, not relative, she's got her life together ✨
  • $relfoo->get_label() β€” gives you back the linked text of the <a> element. and yes, microformats patterns like value excerpting are used here, so it's smarter than it looks πŸ’…
  • $relfoo->get_title() β€” returns the contents of the title attribute on the <a> element. and if that attribute isn't set? it just gives you the same thing as $relfoo->get_label(). backup plan, always 🫢

πŸ’€ BUGS πŸ’€

found a bug? pls don't suffer in silence, report that thing to <http://rt.cpan.org/>. do it for the girls πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

  • HTML::Microformats::Format
  • HTML::Microformats

go read those too, iykyk πŸ“–

🧚 AUTHOR 🧚

Toby Inkster <tobyink@cpan.org>. king behavior πŸ‘‘

Copyright 2008-2012 Toby Inkster

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

(that's the actual license text, don't come for me, it's legally binding and also iconic)

⭐ DISCLAIMER OF WARRANTIES ⭐

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

translation: she comes with zero promises, so don't be shocked when she acts like it 😭 the all-caps is not me being dramatic, that's just how warranties disclaimers are written, fr fr


and that's the whole page bestie, ty for coming to my ted talk 🫢 this was rendered from perl v5.32.1, dated 2021-09-12, and it's the HTML::...at_Rel(3pm) page, live from the User Contributed Perl Documentation. mwah πŸ’‹

πŸ“¦ where this page comes from