HTML::...teLinks(3pm)

πŸ’– NAME πŸ’–

HTML::Microformats::Format::VoteLinks β€” it's the VoteLinks microformat, bestie. That's the whole vibe. πŸ—³οΈβœ¨


✨ SYNOPSIS ✨

my @vlinks = HTML::Microformats::Format::VoteLinks->extract_all(
                  $doc->documentElement, $context);
foreach my $link (@vlinks)
{
  printf("%s (%s)\n", $link->get_href, $link->get_vote;
}
okay yes the parentheses are a lil chaotic in that last line, that's literally what the page says, don't come for me πŸ™ˆ copy it verbatim and move on.

πŸ¦‹ DESCRIPTION πŸ¦‹

HTML::Microformats::Format::VoteLinks inherits from HTML::Microformats::Format_Rel. So like… if you wanna know about the property getter/setter methods, the constructors, all of that, go read the base class definition. It's all there, I'm not repeating it, that's not the move. πŸ’…

πŸŽ€ Additional Methods πŸŽ€

  • $link->get_vote() β€” hands you back a string, and it's one of exactly three: 'for', 'against', or 'abstain'. That's it. That's the whole range of opinions available. πŸ—³οΈ
  • $link->get_voter() β€” returns the hCard of whoever authored the VoteLinks link β€” if it can be figured out from context. And bestie, ngl, usually it can't. 😭 It only really works if the page is also using hAtom, and only if the hAtom on the page has already been parsed. So like, context is everything and context is usually missing, iykyk.

🌈 MICROFORMAT 🌈

HTML::Microformats::Format::VoteLinks supports VoteLinks exactly as described over at <http://microformats.org/wiki/vote-links>. Go read the spec, it's iconic. 🫢


⭐ RDF OUTPUT ⭐

The data comes back using Tom Morris' vote vocabulary β€” that's <http://rdf.opiumfield.com/vote/>. Slay. πŸ”₯


πŸ’€ BUGS πŸ’€

Found a bug? Please report it to <http://rt.cpan.org/>. Be nice about it, they're doing their best. πŸ₯Ί


πŸ‘‘ SEE ALSO πŸ‘‘

  • HTML::Microformats::Format_Rel
  • HTML::Microformats
  • HTML::Microformats::Format::hAtom

🌸 AUTHOR 🌸

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


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. So like, same energy as Perl. Free. Open. Generous. We love to see it. πŸ’–


🚨 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.

like… no promises, bestie. none. zero. zip. it's giving "you're on your own" but in legalese. 😭


perl v5.32.1 Β· 2021-09-12 β€” and that's a wrap on HTML::...teLinks(3pm), mwah πŸ’…βœ¨πŸ¦‹ bye bestie, go vote on something πŸ—³οΈπŸ’œ

πŸ“¦ where this page comes from