HTML::...at::adr(3pm)
โจ NAME โจ
so bestie, gather round ๐ this is HTML::Microformats::Format::adr (section 3pm, the perl one) โ aka the adr microformat, and she's here to parse addresses like it's her whole job (it is ๐
).
๐ธ SYNOPSIS ๐ธ
okay so you literally just do this:
use Data::Dumper;
use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::adr;
my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @adrs = HTML::Microformats::Format::adr->extract_all(
$dom->documentElement, $context);
foreach my $adr (@adrs)
{
print Dumper($adr->data) . "\n";
}
that's it. that's the whole ritual. you build a context, you extract_all the adrs off the document element, and then you dump $adr->data for each one and vibe. ๐ฆ
๐ DESCRIPTION ๐
HTML::Microformats::Format::adr inherits from HTML::Microformats::Format. that's the base class, bestie โ and if you wanna know how property getter/setter methods work, or how constructors work, or literally any of the machinery, you go read the base class definition. she's got the lore. ๐
๐ MICROFORMAT ๐
HTML::Microformats::Format::adr supports adr exactly as it's described at http://microformats.org/wiki/adr โ no cap โ but with these two additions, and honestly? they're the moment. ๐
'type'property โ this module is whatHTML::Microformats::Format::hCarduses to handle addresses inside the hCard microformat. hCard addresses come with a'type'property that tells you what kind of address it is (likehome,work, etc.). This module supports the'type'property whether the address is part of an hCard or not. ๐ ๐ผ- Embedded
geomicroformat โ if an instance of thegeomicroformat is found embedded inside an address, that geographic location gets associated with the address. not them linking up like that ๐ญ it's giving matchmaker.
๐ RDF OUTPUT ๐
the data comes back using the W3C's vCard vocabulary (http://www.w3.org/2006/vcard/ns#), plus the occasional other terms when the vibe calls for it.
so like, the way HTML::Microformats::Format::hCard differentiates between the business card and the entity the card represents? this module does that same little split, but between the address and the location represented by it. ๐ซถ
- the former โ the address โ is an abstract social construction, and its definition gets affected by ephemeral political boundaries (yes bestie, borders are that girl and she's always moving ๐)
- the latter โ the location โ is a physical place. like, an actual spot on the planet.
theoretically, multiple addresses could represent the same location, or overlapping locations โ though this module does not generate any data where that is the case. so don't come for her about it ๐
where possible, the module uses Locale::Country to work out the two letter ISO code for the country of the location, and includes that in the RDF output. little sprinkle of โจinternational flairโจ.
๐ญ BUGS ๐ญ
please report any bugs to http://rt.cpan.org/. she wants to know. tell her everything. ๐ฎ
๐ฅ SEE ALSO ๐ฅ
HTML::Microformats::FormatHTML::MicroformatsHTML::Microformats::Format::hCardHTML::Microformats::Format::geo
the whole friend group, honestly. ๐
๐ AUTHOR ๐
Toby Inkster <tobyink@cpan.org>. icon. legend. the moment. ๐
๐ 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 bestie she is literally telling you she comes with zero promises, take it or leave it, no refunds, no takebacks. read that twice. ๐ซฃ
and that's the page, mwah ๐
โ this was HTML::...at::adr(3pm), from perl v5.32.1, dated 2021-09-12. go forth and parse addresses, you absolute main character ๐ฆโจ
๐ฆ 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