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::Format
  • HTML::Microformats
  • HTML::Microformats::Format::hAtom
  • HTML::Microformats::Format::hEntry

πŸŽ€ AUTHOR πŸŽ€

Toby Inkster <tobyink@cpan.org> β€” the legend, the icon, the moment 🌈


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