From 20c1141d0383f4cc4ac164fd154e89ca1e0cda47 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 26 Nov 2017 16:18:58 +0100 Subject: Clean up code --- bin/mqtt-multipub | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/mqtt-multipub b/bin/mqtt-multipub index c844394..b124476 100755 --- a/bin/mqtt-multipub +++ b/bin/mqtt-multipub @@ -14,7 +14,7 @@ use Time::HiRes qw(usleep); my $mqtt_host; GetOptions( - 'h|host=s' => \$mqtt_host, + 'h|host=s' => \$mqtt_host, 'V|version' => sub { say "mqtt-multipub version $VERSION"; exit 0 }, ); @@ -34,6 +34,7 @@ sub parse_content_string { } return $content; } + # Allow //foo as escape for literal /foo messages $raw_content =~ s{ ^ / / }{/}x; return $raw_content; -- cgit v1.2.3