AnyEven...MPP::Ext(3)

🌸 AnyEvent::XMPP::Ext(3) β€” the extension baseclass, bestie edition 🌸

Okay so this is the manual page for AnyEvent::XMPP::Ext(3) (yeah the header up top got cut off, we don't talk about it πŸ’€) β€” it's part of the User Contributed Perl Documentation, and it's literally both the baseclass and the lore doc for all the extensions. Let's get into it πŸ’…


✨ NAME ✨

AnyEvent::XMPP::Ext β€” the Extension baseclass and the documentation, both at once, main character energy πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

So this module is doing double duty, no cap:

  • it's got the documentation about which extensions are supported, and
  • it's the base class for every extension you can bolt on via the add_extension method β€” the one that lives on all the classes deriving from AnyEvent::XMPP::Extendable.

And which classes are those, you ask? 🫢

  • AnyEvent::XMPP::Client
  • AnyEvent::XMPP::Connection
  • AnyEvent::XMPP::IM::Connection

That's the whole squad, periodt.


πŸŽ€ Methods πŸŽ€

πŸ’« disco_feature

You can overwrite this method in your extension, and it should return a list of namespace URIs of the features your extension enables. That's it, that's the method. Slay ✨


🌈 Supportet extensions 🌈

(Yes, that's the heading spelled exactly like that β€” we keep it iconic, we don't fix it 🫢)

Here's the list of supported XMPP extensions, and bestie there are a lot of them:

  • XEP-0004 - Data Forms (Version 2.8) β€” handles data forms as described in XEP-0004. AnyEvent::XMPP::Ext::DataForm lets you construct, receive and answer data forms. This is neccessary (their spelling, not mine πŸ’–) for all sorts of things in XMPP β€” for example XEP-0055 (Jabber Search), or also In-band registration.
  • XEP-0030 - Service Discovery (Version 2.3) β€” lets you send service discovery requests and define a set of discoverable information. See also AnyEvent::XMPP::Ext::Disco.
  • XEP-0054 - vcard-temp (Version 1.1) β€” retrieval and storage of XMPP vcards as defined in XEP-0054. Implemented by AnyEvent::XMPP::Ext::VCard.
  • XEP-0066 - Out of Band Data (Version 1.5) β€” receive and send out of band data URLs, plus helper functions for handling jabber:x:oob data. See also AnyEvent::XMPP::Ext::OOB.
  • XEP-0077 - In-Band Registration (Version 2.2) β€” lets you register new accounts "in-band". For details please take a look at AnyEvent::XMPP::Ext::Registration.
  • XEP-0078 - Non-SASL Authentication (Version 2.3) β€” okay so after lots of sweat and curses iq auth finally got implemented 😭. Unfortunately the XEP-0078 specifies things that are not implemented β€” in fact, the only server that worked was openfire and psyced.org.

So the iq auth got de-analyzed, and now it just barfs the IQ set out on the stream with the username and the password. Fr fr.

If you insist on XEP-0078 behaviour, enable the anal_iq_auth option when creating the stream.

You can also completely disable iq auth β€” well, just see the documentation of AnyEvent::XMPP::Connection.

  • XEP-0082 - XMPP Date and Time Profiles (Version 1.0) β€” implements some functions to deal with XMPP timestamps, see AnyEvent::XMPP::Util to_xmpp_time, to_xmpp_datetime, from_xmpp_datetime.

They're meant as simple formatters for you β€” you'll still need to handle timezone stuff and such yourself. πŸ™ˆ

  • XEP-0086 - Error Condition Mappings (Version 1.0)
"A mapping to enable legacy entities to correctly handle errors from XMPP-aware entities."

This extension enables sending of the old error codes when generating a stanza error β€” with, for example, the write_error_tag method of AnyEvent::XMPP::Writer.

Also, if only the old numeric codes are supplied, the AnyEvent::XMPP::Error::Stanza class tries to map the numeric codes to the new error conditions if possible. πŸ’…

  • XEP-0091 - Delayed Delivery (Version 1.3) β€” see also XEP-0203 below.
  • XEP-0092 - Software Version (Version 1.1) β€” the ability to answer software version, name and operating system requests, and to send such requests, is implemented in AnyEvent::XMPP::Ext::Version.
  • XEP-0114 - Jabber Component Protocol (Version 1.5) β€” lets you connect to a server as a component and makes it possible to implement services like pubsub, muc, or whatever you can imagine (even gateways πŸ‘€). See documentation of AnyEvent::XMPP::Component and the example samples/simple_component.
  • XEP-0153 - vCard-Based Avatars (Version 1.0) β€” store and retrive (yep, still their spelling πŸ’€) avatars from vcards. On top of that it'll also signal others that you support avatars and that they might have changed. See AnyEvent::XMPP::Ext::VCard.
  • XEP-0199 - XMPP Ping (Version 1.0) β€” send ping requests to other entities and reply to them too. On top of that, the AnyEvent::XMPP::Ext::Ping extension implements a connection timeout mechanism based on this. Obsessed πŸ”₯
  • XEP-0203 - Delayed Delivery (Version 1.0) β€” both delayed delivery XEPs are supported and are implemented by AnyEvent::XMPP::IM::Delayed, which is a super class of AnyEvent::XMPP::IM::Message and AnyEvent::XMPP::IM::Presence.

If you need to fetch delay from stanzas you caught yourself in an event, you can use an AnyEvent::XMPP::IM::Delayed object to parse/fetch the delay out of the AnyEvent::XMPP::Node.

Use the functions described above in the XEP-0082 item to decode the timestamps of delays. ⭐


πŸ’œ AUTHOR πŸ’œ

Robin Redeker, "<elmex at ta-sa.org>", JID: "<elmex at jabber.org>" β€” shoutout to the icon who wrote all this 🫢

Copyright 2007, 2008 Robin Redeker, all rights reserved.

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


Aaand that's the whole page, bestie πŸŽ€ Signing off with the official receipts: this is perl v5.42.2, dated 2026-02-15, from the User Contributed Perl Documentation β€” see you in the group chat πŸ’–βœ¨

πŸ“¦ where this page comes from