XML::A...tompub(3pm)

πŸ“¦
version 0.16.2 Β· 2 versions
  • 0.16.2 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.16.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– XML::Atom::Atompub πŸ’–

okay bestie so this is the Perl doc page for XML::Atom::Atompub β€” it lives in the User Contributed Perl Documentation section, and it's literally the extension pack for XML::Atom that makes the Atom Publishing Protocol (app) work. it's giving glow-up energy for your Atom feeds. πŸ¦‹


✨ NAME ✨

XML::Atom::Atompub β€” Extensions of XML::Atom for the Atom Publishing Protocol. no cap, that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

okay so here's the whole aesthetic, copy-paste ready:

  use XML::Atom::Entry;
  use XML::Atom::Feed;
  use XML::Atom::Atompub;

  my $entry = XML::Atom::Entry->new;

  # <app:edited>2007-01-01T00:00:00Z</app:edited>
  $entry->edited('2007-01-01T00:00:00Z');

  # <app:control><app:draft>yes</app:draft></app:control>
  my $control = XML::Atom::Control->new;
  $control->draft('yes');
  $entry->control($control);

  # <content type="image/png" src="http://example.com/foo.png"/>
  my $content = XML::Atom::Content->new;
  $content->type('image/png');
  $content->src('http://example.com/foo.png');
  $entry->content($content);

  # <link rel="alternate" href="http://example.com/foo.html"/>
  $entry->alternate_link('http://example.com/foo.html');

  my $feed = XML::Atom::Feed->new;

  # <link rel="self" href="http://example.com"/>
  $feed->self_link('http://example.com');

like. it just works. πŸ’…


🧚 METHODS of XML::Atom 🧚

so some elements? they're introduced by the Atom Publishing Protocol, and this module imports them into XML::Atom. it's basically the friend that brings the good snacks to the party. πŸ“

$entry->control([ $control ])

hands you an XML::Atom::Control object representing the control of the Entry β€” or undef if there is no control. (the void. the nothingness. the empty group chat. 😭)

if $control is supplied, it should be an XML::Atom::Control object representing the control. for example:

    my $control = XML::Atom::Control->new;
    $control->draft('yes');
    $entry->control($control);

$entry->edited([ $edited ])

returns an atom:edited element.

if $edited is given, sets the atom:edited element. ✨

$content->src([ $src ])

returns a value of the src attribute in the atom:content element.

if $src is given, the src attribute is added.

returns a value of the href attribute in an atom:link element with a link relation of alternate.

if $href is given, an atom:link element with a link relation of alternate is added.

returns a value of the href attribute in an atom:link element with a link relation of self.

if $href is given, an atom:link element with a link relation of self is added. main character energy tbh πŸ‘‘

returns a value of the href attribute in an atom:link element with a link relation of edit.

if $href is given, an atom:link element with a link relation of edit is added.

returns a value of the href attribute in an atom:link element with a link relation of edit-media.

if $href is given, an atom:link element with a link relation of edit-media is added.

returns a value of the href attribute in an atom:link element with a link relation of related.

if $href is given, an atom:link element with a link relation of related is added.

returns a value of the href attribute in an atom:link element with a link relation of enclosure.

if $href is given, an atom:link element with a link relation of enclosure is added.

returns a value of the href attribute in an atom:link element with a link relation of via.

if $href is given, an atom:link element with a link relation of via is added.

returns a value of the href attribute in an atom:link element with a link relation of first.

if $href is given, an atom:link element with a link relation of first is added.

returns a value of the href attribute in an atom:link element with a link relation of previous.

if $href is given, an atom:link element with a link relation of previous is added.

returns a value of the href attribute in an atom:link element with a link relation of next.

if $href is given, an atom:link element with a link relation of next is added.

returns a value of the href attribute in an atom:link element with a link relation of last.

if $href is given, an atom:link element with a link relation of last is added.


πŸ”₯ SEE ALSO πŸ”₯

  • XML::Atom
  • XML::Atom::Service

go read those too bestie, they're the prequels. πŸ“š


πŸ’œ AUTHOR πŸ’œ

Takeru INOUE, <takeru.inoue _ gmail.com> β€” icon. legend. the moment. 🫢


Copyright (c) 2007, Takeru INOUE "<takeru.inoue _ gmail.com>". All rights reserved.

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


🌈 DISCLAIMER OF WARRANTY 🌈

okay bestie this part is in ALL CAPS in the original and for good reason, so listen up. no warranty. none. zero. πŸ’€

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


and that's the whole page, bestie!! πŸŽ€ this doc was brought to you by perl v5.34.0, dated 2022-06-28, from the fine folks at XML::A...tompub(3pm). slay, hydrate, and go build some feeds. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from