Data::Microformat::hFeed::hEntry - A module to parse and create hEntries


    use Data::Microformat::hFeed::hEntry;

    my $entry = Data::Microformat::hFeed:hEntry->parse($a_web_page);

        print "Entry title is ".$entry->title;
        print "Entry author is ".$entry->author->fullname;      

        # Create a new entry from scratch
        my $entry = Data::Microformat::hFeed::hEntry->new;
        $entry->title("A title");
        $entry->summary("A summary");
        $entry->content("Somebody did something");
        foreach my $tag (qw(tag1 tag2 tag3)) {


An hEntry is a microformat used in hFeeds.

This module exists both to parse existing hEntires from web pages, and to create new hEntries so that they can be put onto the Internet.

To use it to parse an existing hEntry (or hEntries), simply give it the content of the page containing them (there is no need to first eliminate extraneous content, as the module will handle that itself):

    my $entry = Data::Microformat::hFeed::hEntry->parse($content);

If you would like to get all the entries on the webpage, simply ask using an array:

    my @entries = Data::Microformat::hFeed::hEntry->parse($content);

To create a new hEntry, first create the new object:

    my $entry = Data::Microformat::hFeed::hEntry->new;

Then use the helper methods to add any data you would like. When you're ready to output in the hEntry HTML format, simply write

    my $output = $entry->to_html;

And $output will be filled with an hEntry representation, using <div> tags exclusively with the relevant class names.



The microformat class name for an entry; to wit, "hentry"


This is a method to list all the fields on an address that can hold exactly one value.


This is a method to list all the fields on an address that can hold multiple values.

Data::Microformat::organization->from_tree($tree [, $source_url])

This method overrides but provides the same functionality as the method of the same name in Data::Microformat, with the optional addition of $source_url. If present, this latter term will set the base of the entry automatically.


The id of this entry.


The title of this entry.


The base of this entry if available.

The permalink of this entry.


The summary of this entry if available.


The contents of this entry if available.


When this entry was created - returns a DateTime object.


When this entry was modified - returns a DateTime object.


All the tags for this entry.


The author of this entry. Returns a Data::Microformat::hCard object.


The geo location information for this entry. Returns a Data::Microformat::geo object.


Return this hEntry as HTML


Please report any bugs or feature requests to bug-data-microformat at, or through the web interface at I will be notified,and then you'll automatically be notified of progress on your bug as I make changes.


Simon Wistow, <>


Copyright 2008, Six Apart Ltd. All rights reserved.


This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.