HTML::...hReview(3pm)

πŸ’– NAME πŸ’–

HTML::Microformats::Format::hReview β€” bestie, this is the module for the hReview and xFolk microformats. Yes, both. In one module. We contain multitudes. πŸ¦‹


✨ SYNOPSIS ✨

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

use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::hReview;

my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @reviews = HTML::Microformats::Format::hReview->extract_all(
                  $dom->documentElement, $context);
foreach my $review (@reviews)
{
  print $review->get_reviewer->get_fn . "\n";
}

See that last bit? You're grabbing the reviewer and printing their formatted name. It's giving main character energy fr fr. πŸ‘‘


🌸 DESCRIPTION 🌸

So HTML::Microformats::Format::hReview inherits from HTML::Microformats::Format. That's the whole tea. If you wanna know about property getter/setter methods, constructors, all that good stuff β€” go check the base class definition, because that's where it lives. Not here. This page is just the hReview-flavoured part. πŸ’…


πŸŽ€ MICROFORMAT πŸŽ€

HTML::Microformats::Format::hReview supports hReview 0.3 and xFolk exactly as described at <http://microformats.org/wiki/hreview> and <http://microformats.org/wiki/xfolk> β€” with these little differences, bestie, pay attention:

  • hAudio β€” hAudio microformats can be used as the reviewed item. Iconic. But heads up: (at the time of writing this documentation, HTML::Microformats didn't support hAudio!) So like, the vibe was aspirational. 😭
  • Jumbled-up β€” support for xFolk and hReview are bundled together in here, so properties are usually supported in both, even if only one microformat spec actually defines them. Example? reviewer is defined by hReview, but this module supports it in xFolk entries too. We're generous like that. 🫢

🌈 RDF OUTPUT 🌈

<http://www.purl.org/stuff/rev#>, <http://ontologi.es/hreview#>.

That's it. Those are the namespaces. Slay. ✨


πŸ’€ BUGS πŸ’€

Please report any bugs to <http://rt.cpan.org/>. Bestie, I am begging you, tell the maintainers, not me.

Known limitations β€” and this one's a real one:

  • If no "reviewer" is found inside the hReview, parsers should look outside the hReview, in the context of the page, for the "reviewer". And if there's no "reviewer" outside either? Then parsers should use the author defined by the containing document language β€” e.g. for HTML documents, the <address> contact info for the page (which is ideally marked up as an hCard as well). So it's a whole fallback chain. Ngl, kind of a lot, but that's the spec. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

HTML::Microformats::Format, HTML::Microformats.


πŸ‘‘ 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.


🧚 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, no cap. πŸ’œ


And that's the whole page, bestie β€” this one's from perl v5.32.1, dated 2021-09-12. Go forth and extract those reviews. Periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from