Net::M...e::SSL(3pm)
π Net::MQTT::Simple::SSL β the manual, but make it cute π
okay bestie, welcome to the Net::MQTT::Simple::SSL page, perl v5.40.1 vibes, from the User Contributed Perl Documentation corner of the internet. it's a minimal MQTT version 3 interface with SSL support and it's giving secure little messenger π¦π
β¨ NAME β¨
Net::MQTT::Simple::SSL β minimal MQTT version 3 interface, but with SSL support π
πΈ SYNOPSIS πΈ
first up: you can just drop your SSL params into environment variables and let the vibes carry them π
# Specifying SSL parameters in environment variables
export MQTT_SIMPLE_SSL_CA=/etc/ssl/ca.crt
export MQTT_SIMPLE_SSL_CERT=/etc/ssl/mqtt.crt
export MQTT_SIMPLE_SSL_KEY=/etc/ssl/mqtt.key
perl -MNet::MQTT::Simple::SSL=mosquitto.example.org \
-nle'retain "topic/here" => $_'
or, if you're a main character who likes things explicit β¨:
# Specifying explicit SSL parameters
use Net::MQTT::Simple::SSL;
my $mqtt = Net::MQTT::Simple::SSL->new("mosquitto.example.org", {
SSL_ca_file => '/etc/ssl/ca.crt',
SSL_cert_file => '/etc/ssl/mqtt.crt',
SSL_key_file => '/etc/ssl/mqtt.key',
});
$mqtt->publish("topic/here" => "Message here");
$mqtt->retain( "topic/here" => "Message here");
no cap, both paths work. pick your fighter π
π DESCRIPTION π
so basically: this is a subclass of Net::MQTT::Simple that adds SSL/TLS on top. glow-up complete π
like its base class, you can hand it a server right on the "use" line β and when you do, "publish" and "retain" get exported so you can use them as the simplest little functions ever. π«Ά
the thing is though: that "use"-line interface supports configuration via environment variables, but not via explicit options in code. it said no to the code-options invite, respectfully. π
the object oriented interface, however, does support explicit SSL configuration. so if you want the full menu of options you can hand to the constructor, "new", go look at IO::Socket::SSL β it has the comprehensive overview, iykyk. π
πΌ Environment variables πΌ
instead of spelling out the SSL options in the constructor, you can set them with environment variables. and listen: these get overridden by any options you give to "new". constructor wins, always, periodt. π
MQTT_SIMPLE_SSL_INSECUREβ set this to something other than0to disable SSL validation. π¨ (yes, like all "insecure" switches, this is the spicy one, be careful bestie)MQTT_SIMPLE_SSL_CAβ the path to the CA certificate, or to a directory of certificates. on some systemsIO::Socket::SSLcan find the CA path automatically all by itself, little overachiever π§MQTT_SIMPLE_SSL_CERTβ path to the client certificate file.MQTT_SIMPLE_SSL_KEYβ path to its key file. (MQTT_SIMPLE_SSL_CERTandMQTT_SIMPLE_SSL_KEYare two halves of one iconic duo, fr fr π)
π LICENSE π
this software may be redistributed under the terms of the GPL, LGPL, modified BSD, or Artistic license, or any of the other OSI approved licenses listed at http://www.opensource.org/licenses/alphabetical. π
distribution is allowed under all of these licenses, or any smaller subset of multiple or just one of these licenses. so many options, so much freedom, we love to see it β¨
when you're using a packaged version, please check the package metadata to see under which license terms it was distributed. alternatively, a distributor may choose to replace the LICENSE section of the documentation and/or include a LICENSE file to reflect the license(s) they chose to redistribute under. (tl;dr: read the metadata, bestie, it's giving due diligence π)
π AUTHOR π
Juerd Waalboer <juerd@tnx.nl> β thank you for your service, legend π«Ά
π¦ SEE ALSO π¦
Net::MQTT::Simple
and that's the whole page, bestie β slayed, secured, and documented πβ¨πΈ
cute little sign-off: this was the Net::MQTT::Simple::SSL manual page for perl v5.40.1, dated 2025-12-22, rendered in your friendly neighborhood terminal. bye bestie, go publish something π₯π
π¦ where this page comes from
- ubuntu resolute: libnet-mqtt-simple-perl 1.33-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-mqtt-simple-perl 1.33-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms