HTML::Microformats::Format::adr(3pm) User Contributed Perl Documentation HTML::Microformats::Format::adr(3pm)

HTML::Microformats::Format::adr - the adr microformat

 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";
 }

HTML::Microformats::Format::adr inherits from HTML::Microformats::Format. See the base class definition for a description of property getter/setter methods, constructors, etc.

HTML::Microformats::Format::adr supports adr as described at <http://microformats.org/wiki/adr>, with the following additions:

Data is returned using the W3C's vCard vocabulary (<http://www.w3.org/2006/vcard/ns#>) and occasional other terms.

Like how HTML::Microformats::Format::hCard differentiates between the business card and the entity represented by the card, this module differentiates between the address and the location represented by it. The former is an abstract social construction, its definition being affected by ephemeral political boundaries; the latter is a physical place. Theoretically multiple addresses could represent the same, or overlapping locations, though this module does not generate any data where that is the case.

Where possible, the module uses Locale::Country to determine the two letter ISO code for the country of the location, and include this in the RDF output.

Please report any bugs to <http://rt.cpan.org/>.

HTML::Microformats::Format, HTML::Microformats, HTML::Microformats::Format::hCard, HTML::Microformats::Format::geo.

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.

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.

2021-09-12 perl v5.32.1