The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Web::Microformats2::Parser - Read Microformats2 information from HTML

DESCRIPTION

An object of this class represents a Microformats2 parser.

See Web::Microformats2 for further context and purpose.

METHODS

Class Methods

new

 $parser = Web::Microformats2::Parser->new;

Returns a parser object.

Object Methods

parse

 $doc = $parser->parse( $html, %args );

Pass in a string containing HTML which itself contains Microformats2 metadata, and receive a Web::Microformats2::Document object in return.

The optional args hash recognizes the following keys:

url_context

A URI object or URI-shaped string that will be used as a context for transforming all relative URL properties encountered within MF2 tags into absolute URLs.

The default value is http://example.com, so you'll probably want to set this to something more interesting, such as the absolute URL of the HTML that we are parsing.

AUTHOR

Jason McIntosh (jmac@jmac.org)

COPYRIGHT AND LICENSE

This software is Copyright (c) 2018 by Jason McIntosh.

This is free software, licensed under:

  The MIT (X11) License