}
}
+
+sub add_enclosure {
+ my($entry, $enclosure) = @_;
+ my $link = XML::Atom::Link->new;
+ $link->rel('enclosure');
+ $link->type($enclosure->type);
+ $link->href($enclosure->url);
+ $link->length($enclosure->length);
+ $entry->{entry}->add_link($link);
+};
+
+
1;
}
}
+sub add_enclosure {
+ my($entry, $enclosure) = @_;
+ $entry->{entry}->{enclosure} = XML::RSS::LibXML::MagicElement->new(
+ attributes => {
+ url => $enclosure->{url},
+ type => $enclosure->{type},
+ length => $enclosure->{length}
+ },
+ );
+}
1;