| Net-Google-PicasaWeb documentation | Contained in the Net-Google-PicasaWeb distribution. |
Net::Google::PicasaWeb::MediaFeed - base class for media feed entries
version 0.11
Provides some common functions for the media-based objects (the ones with photo/video links). This class extends Net::Google::PicasaWeb::Feed.
This is the photo for the media feed object. This returns a Net::Google::Picasa::Media.
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
This software is copyright (c) 2011 by Andrew Sterling Hanenkamp.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| Net-Google-PicasaWeb documentation | Contained in the Net-Google-PicasaWeb distribution. |
package Net::Google::PicasaWeb::MediaFeed; BEGIN { $Net::Google::PicasaWeb::MediaFeed::VERSION = '0.11'; } use Moose; extends 'Net::Google::PicasaWeb::Feed'; # ABSTRACT: base class for media feed entries has photo => ( is => 'rw', isa => 'Net::Google::PicasaWeb::Media', ); override from_feed => sub { my ($class, $service, $entry) = @_; my $self = $class->super($service, $entry); if ($entry->has_child('media:group')) { my $media = Net::Google::PicasaWeb::Media->from_feed( $self->service, $entry->first_child('media:group') ); $self->photo($media); } return $self; }; __PACKAGE__->meta->make_immutable; 1; __END__