HTML::...figure(3pm)

πŸ’– NAME πŸ’–

okay so bestie, welcome to HTML::Microformats::Format::figure β€” it's the figure microformat, and it's literally the whole personality of this module. that's it. that's the name. periodt. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the vibe, copy-paste ready, no cap:

use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::figure;
use Scalar::Util qw(blessed);

my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @objects = HTML::Microformats::Format::figure->extract_all(
                  $dom->documentElement, $context);
foreach my $fig (@objects)
{
  printf("<%s> %s\n", $fig->get_image, $fig->get_legend->[0]);
  foreach my $maker ($p->get_credit)
  {
    if (blessed($maker))
    {
      printf("  - by %s\n", $maker->get_fn);
    }
    else
    {
      printf("  - by %s\n", $maker);
    }
  }
}

look at her go. extracting every figure, printing the image and the first legend, then looping through the credits and checking with blessed whether each maker is a whole object or just a plain string. main character energy fr fr. πŸ’…


🌸 DESCRIPTION 🌸

HTML::Microformats::Format::figure inherits from HTML::Microformats::Format. so if you're like "wait, where are the getters, the setters, the constructors, all of that"β€”bestie, they're in the base class definition. go read that. she says it right there. 🫢


πŸŽ€ MICROFORMAT πŸŽ€

HTML::Microformats::Format::figure supports figure as described at <http://microformats.org/wiki/figure>. that's the source of truth, go look. πŸ”₯


🌈 RDF OUTPUT 🌈

Data is returned using Dublin Core and FOAF. iconic combo honestly. πŸ‘‘


πŸ’€ BUGS πŸ’€

Please report any bugs to <http://rt.cpan.org/>. not me manifesting bug reports but like... if you find one, tell the people. πŸ™ˆ


⭐ SEE ALSO ⭐

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

iykyk. go read those next, they're the supporting cast. πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Toby Inkster <tobyink@cpan.org>. we stan. πŸ’–


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.

same terms as Perl itself, bestie β€” that's the whole deal. ✨


🧚 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.

okay so this part is the serious part β€” no promises, no guarantees, no warranty of any kind, express or implied, and that includes merchantibility and fitness for a particular purpose. she said what she said. 😭


and that's the whole page, bestie!! this one's from perl v5.32.1, dated 2021-09-12, and the page itself is HTML::...figure(3pm) from the User Contributed Perl Documentation. mwah. πŸ’…πŸŽ€πŸ’–

πŸ“¦ where this page comes from