package Text::Microformat::Element::URI; use warnings; use strict; use base 'Text::Microformat::Element'; sub MachineValue { my $self = shift; my $tag = defined $self->_element->local_name ? $self->_element->local_name : ""; if ($tag eq 'a') { return $self->_element->attr('href'); } elsif ($tag eq 'img') { return $self->_element->attr('src'); } elsif ($tag eq 'object') { return $self->_element->attr('data'); } else { return $self->SUPER::MachineValue; } } =head1 NAME Text::Microformat::Element::URI - a Microformat URI element =head1 SEE ALSO L, L =head1 AUTHOR Keith Grennan, C<< >> =head1 BUGS Log bugs and feature requests here: L =head1 SUPPORT Project homepage: L =head1 COPYRIGHT & LICENSE Copyright 2007 Keith Grennan, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut 1;