1Net::Jabber(3) User Contributed Perl Documentation Net::Jabber(3)
2
3
4
6 Net::Jabber - Jabber Perl Library
7
9 Net::Jabber provides a Perl user with access to the Jabber Instant
10 Messaging protocol.
11
12 For more information about Jabber visit:
13
14 http://www.jabber.org
15
17 Net::Jabber is a convenient tool to use for any perl script that would
18 like to utilize the Jabber Instant Messaging protocol. While not a
19 client in and of itself, it provides all of the necessary back-end
20 functions to make a CGI client or command-line perl client feasible and
21 easy to use. Net::Jabber is a wrapper around the rest of the official
22 Net::Jabber::xxxxxx packages.
23
24 There is are example scripts in the example directory that provide you
25 with examples of very simple Jabber programs.
26
27
28 NOTE: The parser that XML::Stream::Parser provides, as are most Perl
29 parsers, is synchronous. If you are in the middle of parsing a packet
30 and call a user defined callback, the Parser is blocked until your
31 callback finishes. This means you cannot be operating on a packet,
32 send out another packet and wait for a response to that packet. It
33 will never get to you. Threading might solve this, but as of the
34 writing of this, threading in Perl is not quite up to par yet. This
35 issue will be revisted in the future.
36
38 For a client:
39 use Net::Jabber;
40 my $client = new Net::Jabber::Client();
41
42 For a component:
43 use Net::Jabber;
44 my $component = new Net::Jabber::Component();
45
47 The Net::Jabber module does not define any methods that you will call
48 directly in your code. Instead you will instantiate objects that call
49 functions from this module to do work. The three main objects that
50 you will work with are the Message, Presence, and IQ modules. Each one
51 corresponds to the Jabber equivilant and allows you get and set all
52 parts of those packets.
53
55 For more information on each of these packages, please see the man page
56 for each one.
57
58 Net::Jabber::Client
59 This package contains the code needed to communicate with a Jabber
60 server: login, wait for messages, send messages, and logout. It uses
61 XML::Stream to read the stream from the server and based on what kind
62 of tag it encounters it calls a function to handle the tag.
63
64 Net::Jabber::Component
65 This package contains the code needed to write a server component. A
66 component is a program tha handles the communication between a jabber
67 server and some outside program or communications pacakge (IRC, talk,
68 email, etc...) With this module you can write a full component in just
69 a few lines of Perl. It uses XML::Stream to communicate with its host
70 server and based on what kind of tag it encounters it calls a function
71 to handle the tag.
72
73 Net::Jabber::Protocol
74 A collection of high-level functions that Client and Component use to
75 make their lives easier through inheritance.
76
77 Net::Jabber::JID
78 The Jabber IDs consist of three parts: user id, server, and resource.
79 This module gives you access to those components without having to
80 parse the string yourself.
81
82 Net::Jabber::Message
83 Everything needed to create and read a <message/> received from the
84 server.
85
86 Net::Jabber::Presence
87 Everything needed to create and read a <presence/> received from the
88 server.
89
90 Net::Jabber::IQ
91 IQ is a wrapper around a number of modules that provide support for the
92 various Info/Query namespaces that Jabber recognizes.
93
94 Net::Jabber::Stanza
95 This module represents a namespaced stanza that is used to extend a
96 <message/>, <presence/>, and <iq/>. Ultimately each namespace is
97 documented in a JEP of some kind. http://jabber.org/jeps/
98
99 The man page for Net::Jabber::Stanza contains a listing of all
100 supported namespaces, and the methods that are supported by the objects
101 that represent those namespaces.
102
103 Net::Jabber::Namespaces
104 Jabber allows for any stanza to be extended by any bit of XML. This
105 module contains all of the internals for defining the Jabber based
106 extensions defined by the JEPs. The documentation for this module
107 explains more about how to add your own custom namespace and have it be
108 supported.
109
111 Ryan Eatmon
112
114 This module is free software, you can redistribute it and/or modify it
115 under the same terms as Perl itself.
116
117
118
119perl v5.38.0 2023-07-21 Net::Jabber(3)