HTML::...losure(3pm)
β¨ NAME β¨
so like, this page is all about HTML::Microformats::Format::RelEnclosure β the rel-enclosure microformat π (and yes bestie, it lives in the 3pm perl section, iykyk)
π SYNOPSIS π
okay so here's the vibe, literally copy-paste coded exactly like this:
my @enclosures = HTML::Microformats::Format::RelEnclosure->extract_all(
$doc->documentElement, $context);
foreach my $e (@enclosures)
{
my $type = $l->get_type || 'unknown';
printf("%s (%s)\n"), $l->get_href, $type);
}
ngl that printf line is giving exactly-what-it-says, so don't go "fixing" it on me, bestie β it's quoted verbatim π«Ά
π DESCRIPTION π
HTML::Microformats::Format::RelEnclosure inherits from HTML::Microformats::Format_Rel. That's the whole family tree moment πΈ β the base class definition is where you go for the tea on property getter/setter methods, constructors, etc. etc. Go read it, it ate.
π Additional Method π
$relenc->get_type()β bestie this one hands you the media type (aka the Content-Type) of the resource that's being linked to. Where does it come from? The HTMLtypeattribute. And if that attribute isn't there? It returnsundef. No type, no tea. π
π¦ MICROFORMAT π¦
HTML::Microformats::Format::RelEnclosure supports rel-enclosure exactly as described over at <http://microformats.org/wiki/rel-enclosure>. iconic, we love a spec link π
Also important, no cap: the title attribute on the link, and the linked text, are taken to be significant. Both of them. Periodt.
π₯ RDF OUTPUT π₯
Data comes back using the RSS Enclosures vocabulary (<http://purl.oclc.org/net/rss_2.0/enc#>) plus occasional other terms. So like, mostly that vocab, sometimes a lil guest star β¨
π BUGS π
Found a bug? Please report it to <http://rt.cpan.org/>. Don't be shy, bestie, RT is right there π«Ά
π SEE ALSO π
- HTML::Microformats::Format_Rel
- HTML::Microformats
- HTML::Microformats::Format::hAtom
go read those next, it's giving required reading π
πΈ AUTHOR πΈ
Toby Inkster <tobyink@cpan.org>. yes, THE Toby Inkster π
π 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. same terms as Perl itself, literally, that's the 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.
bestie read that one again. NO warranties. none. zero. not even the implied ones. it's giving "you're on your own" energy and I need you to respect it π
perl v5.32.1 π 2021-09-12 β that's the version and the date this page was born, and that's a wrap on HTML::...losure(3pm) π
mwah, go enclose something cute π
π¦ 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