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::Microformatsdidn'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?
revieweris 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 AND LICENCE π
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
- debian bookworm: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms