HTML::...::hNews(3pm)
π NAME π
HTML::Microformats::Format::hNews β bestie, it's the hNews microformat β¨ (yes that's the whole name, she's the main character of this page)
This is from the User Contributed Perl Documentation collection, and it lives at HTML::...::hNews(3pm) β that's her whole address, no cap π«Ά
β¨ SYNOPSIS β¨
okay so here's the vibe, literally copy-paste this and you're golden:
use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::hNews;
my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @objects = HTML::Microformats::Format::hNews->extract_all(
$dom->documentElement, $context);
foreach my $article (@objects)
{
printf("%s %s\n", $article->get_link, $article->get_dateline);
}
look at that loop go π it prints the link and the dateline for every single article and honestly? iconic.
π¦ DESCRIPTION π¦
so HTML::Microformats::Format::hNews inherits from HTML::Microformats::Format 𧬠β like, the base class is the mother, this one is the daughter, iykyk.
if you wanna know about property getter/setter methods, constructors, all that stuff, go read the base class definition. that's where the lore lives, bestie π
πΈ MICROFORMAT πΈ
HTML::Microformats::Format::hNews supports hNews exactly as it's described over at <http://microformats.org/wiki/hNews> β that's the source of truth, no cap β
π RDF OUTPUT π
here's the tea: hNews is an extension of hAtom π«Ά so the data comes back using the same vocabularies as hAtom, plus some extra news-specific terms from <http://ontologi.es/hnews#>. it's giving glow-up, honestly β¨
π BUGS π
found a bug? π pls report it, don't just suffer in silence:
bestie the RT link is right there, use it, we're all rooting for you π
π SEE ALSO π
go read these next, they're all in the same friend group:
HTML::Microformats::FormatHTML::MicroformatsHTML::Microformats::Format::hAtomHTML::Microformats::Format::hEntry
π AUTHOR π
Toby Inkster <tobyink@cpan.org> β the legend, the icon, the moment π
π 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.
like, same terms as Perl, it's that simple, slay π
β 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.
fr fr, no warranties, she's giving it to you as-is, take it or leave it π (but like, take it π)
and that's the whole page bestie π«Ά this was perl v5.32.1, dated 2021-09-12, and yes, the manual page is literally named HTML::...::hNews(3pm) β go forth and parse microformats, mwah πβ¨
π¦ 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