NAME
Net::MQTT::Simple::Auth - Enables User/Password Authentication to Net::MQTT::Simple Client
VERSION
version 0.002
SYNOPSIS
# Object oriented (extends Net::MQTT::Simple)
my
$mqtt
= Net::MQTT::Simple::Auth->new(
"mosquitto.example.org:1883"
,
"user"
,
"password"
[,
$socket_opts
]);
# Refers to L<Net::MQTT::Simple>
$mqtt
->publish(
"topic/here"
=>
"Message here"
);
$mqtt
->retain(
"topic/here"
=>
"Message here"
);
$mqtt
->run(
"sensors/+/temperature"
=>
sub
{
my
(
$topic
,
$message
) =
@_
;
die
"The building's on fire"
if
$message
> 150;
},
"#"
=>
sub
{
my
(
$topic
,
$message
) =
@_
;
"[$topic] $message\n"
;
},
}
DESCRIPTION
Adds login authentication via username and password to the very helpful and easy to use Net::MQTT::Simple Client
LICENSE
Same as it's parent: Pick your favourite OSI approved license :)
http://www.opensource.org/licenses/alphabetical
AUTHOR
Manuel Krenzke