HTML::...roduct(3pm)

✨ NAME ✨

HTML::Microformats::Format::hProduct β€” bestie, it's the hProduct microformat module πŸ’–

Okay so real quick, the manual name situation: this page lives under User Contributed Perl Documentation, and it's the 3pm flavour of the man page. Just so you know where you are. 🫢


🌸 SYNOPSIS 🌸

use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::hProduct;

my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @objects = HTML::Microformats::Format::hProduct->extract_all(
                  $dom->documentElement, $context);
foreach my $p (@objects)
{
  printf("%s\n", $m->get_fn);
  if ($p->get_review)
  {
    foreach my $r ($p->get_review)
    {
      printf("  - reviewed by %s\n", $r->get_reviewer->get_fn);
    }
  }
  else
  {
    print "    (no reviews yet)\n");
  }
}
ngl bestie, that $m in the printf is straight from the source, no cap. And that closing paren on the print line? Also exactly as written. Copy-paste at your own risk, I'm just the messenger πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

HTML::Microformats::Format::hProduct inherits from HTML::Microformats::Format. πŸ’…

So like, if you wanna know about property getter/setter methods, constructors, all that good stuff β€” go read the base class definition, because that's where it lives. This page is just the hProduct-specific era. ✨


πŸŽ€ MICROFORMAT πŸŽ€

HTML::Microformats::Format::hProduct supports hProduct 0.3, as described at <http://microformats.org/wiki/hProduct> β€” and it's giving extra credit, because there are additions: πŸ‘‘

  • 'item' propagation.

If 'review' and 'listing' objects don't have an 'item' set, then their 'item' property gets set to this object. Basically the parent shows up and says "you're with me now" 🫢


🌈 RDF OUTPUT 🌈

Product data is primarily output using GoodRelations v1 (<http://purl.org/goodrelations/v1#>) β€” that's the vibe, that's the namespace, periodt. ⭐


πŸ’€ BUGS πŸ’€

Found a bug? Please report any bugs to <http://rt.cpan.org/>. Do it, bestie, the maintainers wanna know πŸ™ˆ


πŸ“ SEE ALSO πŸ“

  • HTML::Microformats::Format
  • HTML::Microformats

Both iconic, both worth a read πŸ’œ


πŸ‘‘ 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, fr fr, no promises, no guarantees, she is what she is 😭


okay that's the whole page!! πŸ¦‹ this was perl v5.32.1, dated 2021-09-12, and it's the HTML::...roduct(3pm) page under User Contributed Perl Documentation. slay, go extract some products πŸ’–βœ¨

πŸ“¦ where this page comes from