From e620d437b83b3a38c92abe71e158cb21146bd184 Mon Sep 17 00:00:00 2001 From: Matthias Bethke Date: Tue, 22 Nov 2016 23:35:36 +0700 Subject: [PATCH] allow fractional seconds in listval_filter() --- bindings/perl/lib/Collectd/Unixsock.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/perl/lib/Collectd/Unixsock.pm b/bindings/perl/lib/Collectd/Unixsock.pm index ca21d405..37f04cfe 100644 --- a/bindings/perl/lib/Collectd/Unixsock.pm +++ b/bindings/perl/lib/Collectd/Unixsock.pm @@ -383,7 +383,7 @@ sub listval_filter (exists $args{plugin_instance} ? "-$args{plugin_instance}" : '(?:-[^/]+)?') . (exists $args{type} ? "/$args{type}" : '/[^/-]+') . (exists $args{type_instance} ? "-$args{type_instance}" : '(?:-[^/]+)?'); - $pattern = qr/^\d+ $pattern$/; + $pattern = qr/^\d+\.\d+ $pattern$/; my $msg = $self->_socket_command('LISTVAL') or return; ($nresults, $msg) = split / /, $msg, 2; @@ -410,7 +410,7 @@ sub listval_filter } # for (i = 0 .. $status) return @ret; -} # listval +} # listval_filter =item I<$res> = I<$self>-EB () -- 2.11.0