HTML::...::hCard(3pm)
๐ HTML::...::hCard ๐
okay so bestie, we're looking at HTML::Microformats::Format::hCard โ the hCard microformat, from the HTML::...::hCard(3pm) page in your perl man pages. sit down, grab a boba, this is gonna be good ๐งโจ
โจ NAME โจ
HTML::Microformats::Format::hCard โ the hCard microformat. that's it, that's the whole name, iconic ๐
๐ฆ SYNOPSIS ๐ฆ
the vibe, in code:
use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::hCard;
my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @cards = HTML::Microformats::Format::hCard->extract_all(
$dom->documentElement, $context);
foreach my $card (@cards)
{
print $card->get_fn . "\n";
}
like, you make a context, you extract all the cards, you loop and print the fn. slay ๐
๐ธ DESCRIPTION ๐ธ
HTML::Microformats::Format::hCard inherits from HTML::Microformats::Format. so if you wanna know about the property getter/setter methods, the constructors, all of that โ go read the base class definition. it's giving "family business" fr fr ๐ซถ
๐ Additional Method ๐
to_vcardโ this one exports the hCard as a vCard 3.0. it needsRDF::vCardto work, and ngl if that's not available it will throw an error at run-time. no cap ๐ญto_vcard4โ this one exports the hCard as a vCard 3.0. it needsRDF::vCardto work, and yep, it will throw an error at run-time if it's not available ๐to_vcard4_xmlโ exports the hCard as a vCard XML. it needsRDF::vCardandXML::LibXMLto work, and it will throw an error at run-time if it's not available. two dependencies, main character energy โจ
๐ MICROFORMAT ๐
HTML::Microformats::Format::hCard supports hCard as described at <http://microformats.org/wiki/hcard> โ with the following additions, and bestie these additions eat:
- vCard 4.0 terms โ this module includes extra property terms taken from the latest vCard 4.0 drafts. for example, the property
imppmay be used to mark up instant messaging addresses for a contact. so you can put someone's IM handles in there, lowkey genius ๐ฑ the vCard 4.0 propertykindis used to record the kind of contact described by the hCard (an individual, an organisation, etc). in many cases this is automatically inferred. the module just knows ๐ฎ - Embedded species microformat โ if the species microformat (see
HTML::Microformats::Format::species) is found embedded within an hCard, then this is taken to be the species of a contact. cute ๐พ - Embedded hMeasure โ if the hMeasure microformat (see
HTML::Microformats::Format::hMeasure) is found embedded within an hCard, and noitemproperty is provided, then the measurement is taken to pertain to the contact described by the hCard. it's giving "this height belongs to this person" ๐
๐ RDF OUTPUT ๐
data is returned using the W3C's vCard vocabulary (<http://www.w3.org/2006/vcard/ns#>) with some supplemental terms from Toby Inkster's vCard extensions vocabulary (<http://buzzword.org.uk/rdf/vcardx#>) and occasional other terms. a little mix, a little remix, we love a curated selection ๐
now, after long deliberation on the "has-a/is-a issue" โ drama, honestly โ the author of this module decided that the holder of a vCard and the vCard itself should be modelled as two separate resources, and this is how the data is returned. periodt. so some information about the holder of the vCard can be inferred from information about the vCard; for instance, the vCard's fn property can be used to determin the holder's foaf:name. this module uses FOAF (<http://xmlns.com/foaf/0.1/>) to represent information about the holder of the vCard. two resources, one friendship ๐
๐ญ BUGS ๐ญ
please report any bugs to <http://rt.cpan.org/>. don't suffer in silence bestie, tell RT ๐ซถ
๐ฅ SEE ALSO ๐ฅ
HTML::Microformats::Format, HTML::Microformats.
๐ AUTHOR ๐
Toby Inkster <tobyink@cpan.org>.
๐ 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.
โ ๏ธ 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, no promises, bestie, it is what it is ๐
and that's the whole page!! this was perl v5.32.1, dated 2021-09-12, from the HTML::...::hCard(3pm) manual. go forth and mark up your contacts, you absolute legend ๐๐
๐ฆ 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