AnyEven...espaces(3)
๐ AnyEven...espaces(3) โ like, the whole manual, bestie
Ok so real talk: this is the AnyEvent::XMPP::Namespaces page from the User Contributed Perl Documentation (that's the manual name, clocked it for you ๐ซถ). It's short, it's sweet, and it's genuinely gonna save you so much pain. Let's go โจ
๐ NAME
AnyEvent::XMPP::Namespaces โ the XMPP namespace collection and aliasing class. That's it, that's the whole vibe: it collects namespaces and it aliases them. Iconic, honestly.
๐ SYNOPSIS
use AnyEvent::XMPP::Namespaces qw/xmpp_ns set_xmpp_ns_alias/;
set_xmpp_ns_alias (stanzas => 'urn:ietf:params:xml:ns:xmpp-stanzas');
Literally two lines and you're already doing namespace wizardry. Slay.
๐ DESCRIPTION
So this module is a simple namespaces aliasing mechanism. That's its whole job, no cap. It exists so you don't have to suffer when you're:
- traversing
AnyEvent::XMPP::Nodeobjects ๐ฎโ๐จ - writing XML with
AnyEvent::XMPP::Writer๐๏ธ
Basically: long ugly namespace URIs in, short cute nicknames out. Your future self says thank you ๐
๐ฆ XMPP NAMESPACES
Good news bestie โ some aliases are already defined for the XMPP XML namespaces, which makes handling of namepsaces a bit easier (their spelling, not mine ๐). Here's the whole list, verbatim, because we respect the data:
stream => http://etherx.jabber.org/streams
xml => http://www.w3.org/XML/1998/namespace
streams => urn:ietf:params:xml:ns:xmpp-streams
session => urn:ietf:params:xml:ns:xmpp-session
stanzas => urn:ietf:params:xml:ns:xmpp-stanzas
sasl => urn:ietf:params:xml:ns:xmpp-sasl
bind => urn:ietf:params:xml:ns:xmpp-bind
tls => urn:ietf:params:xml:ns:xmpp-tls
client => jabber:client
roster => jabber:iq:roster
version => jabber:iq:version
auth => jabber:iq:auth
iq_oob => jabber:iq:oob
x_oob => jabber:x:oob
disco_info => http://jabber.org/protocol/disco#info
disco_items => http://jabber.org/protocol/disco#items
register => http://jabber.org/features/iq-register
iqauth => http://jabber.org/features/iq-auth
data_form => jabber:x:data
ping => urn:xmpp:ping
vcard => vcard-temp
pubsub => http://jabber.org/protocol/pubsub
pubsub_own => http://jabber.org/protocol/pubsub#owner
pubsub_ev => http://jabber.org/protocol/pubsub#event
Twenty-four aliases, all pre-loaded, no setup required. We love a zero-effort win ๐ธ
๐ฅ FUNCTIONS
Three functions. Three. That's the whole API and it's giving minimalist queen energy ๐
โญ xmpp_ns ($alias)
Returns am uri for the registered $alias โ or undef if none exists. ("am uri" is what the original says and I'm not gonna gaslight you by pretending otherwise ๐ญ). So: registered alias in, URI out. Not registered? You get undef, respectfully.
โญ xmpp_ns_maybe ($alias_or_namespace_uri)
This one's the chill one. It tries to find whether there's an alias registered under $alias_or_namespace_uri, and if there isn't, it just hands you back $alias_or_namespace_uri unchanged. No dying, no drama โ it's giving "come as you are" ๐ซถ
โญ set_xmpp_ns_alias ($alias, $namespace_uri)
Sets an $alias for the $namespace_uri. Two args, one assignment, infinite power ๐
๐ AUTHOR
Robin Redeker โ "<elmex at ta-sa.org>" โ JID: "<elmex at jabber.org>"
(Yes, both of those, exactly as written, one for email one for Jabber. Respect the multitasking ๐)
๐ COPYRIGHT & LICENSE
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.
Fun little legal moment, bestie: "all rights reserved" and "free software" in the same breath โ that's just how Perl licensing rolls, don't overthink it ๐
aaaand that's the whole page, no skips, no cuts, every alias accounted for. Signing off with the source deets: this was perl v5.42.2, dated 2026-02-15, page AnyEven...espaces(3). Go forth and alias responsibly, bestie โ you're gonna eat ๐โจ๐
๐ฆ where this page comes from
- alpine 3.24: perl-anyevent-xmpp-doc 0.55-r1 ยท GPL-1.0-or-later OR Artistic-1.0-Perl
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms