Net::Ja...::Verify(3)

πŸ’– NAME πŸ’–

Net::Jabber::Dialback::Verify β€” the Jabber Dialback Verify Module, bestie. That's it, that's the name, and it's lowkey iconic.

So this is a User Contributed Perl Documentation page for Net::Jabber::Dialback::Verify(3) β€” like, section 3 of the manual, for those of you keeping score at home πŸŽ€


✨ SYNOPSIS ✨

Okay so basically:

Net::Jabber::Dialback::Verify is a companion to the Net::Jabber::Dialback
module.  It provides the user a simple interface to set and retrieve all
parts of a Jabber Dialback Verify.

It's the little sibling module 🫢 β€” a companion to Net::Jabber::Dialback β€” and its whole personality is "simple interface to set and retrieve all parts of a Jabber Dialback Verify." No cap.


πŸ¦‹ DESCRIPTION πŸ¦‹

So, to initialize the Verify with a Jabber <db:*/> you must pass it the XML::Stream hash. Like this, fr fr:

my $dialback = new Net::Jabber::Dialback::Verify(%hash);

πŸ’… the callback glow-up (iykyk)

There has been a change from the old way of handling the callbacks, and honestly? It's giving upgrade. You no longer have to do the above yourself β€” instead, a NJ::Dialback::Verify object is passed to the callback function for the message. Slay.

Also, the first argument to the callback functions is the session ID from XML::Streams. There are some cases where you might actually want this info β€” like if you created a Client that connects to two servers at once, or for writing a mini server. Main character energy for the multi-server girlies πŸ‘‘

use Net::Jabber qw(Server);

sub dialbackVerify {
  my ($sid,$Verify) = @_;
  .
  .
  .
}

And now you have access to all of the retrieval functions available. All of them. Obsessed.

🧚 making a new one

To create a new dialback to send to the server:

use Net::Jabber qw(Server);

$Verify = new Net::Jabber::Dialback::Verify();

Now you can call the creation functions below to populate the tag before sending it. Easy.

For more information about the array format being passed to the CallBack, please read the Net::Jabber::Client documentation. (Go read it, bestie, it's right there πŸ’œ)

πŸŽ€ Retrieval functions

$to         = $Verify->GetTo();
$from       = $Verify->GetFrom();
$type       = $Verify->GetType();
$id         = $Verify->GetID();
$data       = $Verify->GetData();

$str        = $Verify->GetXML();
@dialback   = $Verify->GetTree();

πŸ”₯ Creation functions

$Verify->SetVerify(from=>"jabber.org",
                   to=>"jabber.com",
                   id=>id,
                   data=>key);
$Verify->SetTo("jabber.org");
$Verify->SetFrom("jabber.com");
$Verify->SetType("valid");
$Verify->SetID(id);
$Verify->SetData(key);

⭐ Test functions

$test = $Verify->DefinedTo();
$test = $Verify->DefinedFrom();
$test = $Verify->DefinedType();
$test = $Verify->DefinedID();

πŸ‘‘ METHODS πŸ‘‘

🌸 Retrieval functions

  • GetTo() β€” returns a string with the server that the <db:verify/> is being sent to.
  • GetFrom() β€” returns a string with the server that the <db:verify/> is being sent from.
  • GetType() β€” returns a string with the type this <db:verify/> is.
  • GetID() β€” returns a string with the id this <db:verify/> is.
  • GetData() β€” returns a string with the cdata of the <db:verify/>.
  • GetXML() β€” returns the XML string that represents the <db:verify/>. This is used by the Send() function in Server.pm to send this object as a Jabber Dialback Verify. It's literally the ✨ transport layer ✨ of vibes.
  • GetTree() β€” returns an array that contains the <db:verify/> tag in XML::Parser::Tree format.

πŸ’œ Creation functions

  • SetVerify(to=>string, from=>string, type=>string, id=>string, data=>string) β€” set multiple fields in the <db:verify/> at one time. Heads up, bestie: this is a cumulative and over writing action. If you set the "from" attribute twice, the second setting is what is used (last one wins, periodt). If you set the type, and then set the data, then both will be in the <db:verify/> tag. For valid settings read the specific Set functions below πŸ‘‡
  • SetTo(string) β€” sets the to attribute.
  • SetFrom(string) β€” sets the from attribute.
  • SetType(string) β€” sets the type attribute. Valid settings are:
    • valid
    • invalid
Fr fr only those two, don't try to be creative πŸ’€
  • SetID(string) β€” sets the id attribute.
  • SetData(string) β€” sets the cdata of the <db:verify/>.

πŸ“ Test functions

  • DefinedTo() β€” returns 1 if the to attribute is defined in the <db:verify/>, 0 otherwise.
  • DefinedFrom() β€” returns 1 if the from attribute is defined in the <db:verify/>, 0 otherwise.
  • DefinedType() β€” returns 1 if the type attribute is defined in the <db:verify/>, 0 otherwise.
  • DefinedID() β€” returns 1 if the id attribute is defined in the <db:verify/>, 0 otherwise.

🌈 AUTHOR 🌈

By Ryan Eatmon in May of 2001 for http://jabber.org.. β€” yes, with two dots at the end, we're keeping it exactly as written because that's what the original says and we don't do edits around here πŸ˜­πŸ’– A 2001 king, honestly.


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


Okay that's the whole page, bestie, you ate πŸ’… And for the sign-off: this was perl v5.42.2, dated 2026-02-15, and you were reading Net::Ja...::Verify(3) the whole time πŸ¦‹βœ¨ Go forth and dialback verify, icon πŸ‘‘

πŸ“¦ where this page comes from