summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 85c31a6)
raw | patch | inline | side by side (parent: 85c31a6)
author | Ciaran Mac An Iomaire <ciomaire@adobe.com> | |
Wed, 7 Oct 2015 15:20:20 +0000 (08:20 -0700) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Wed, 14 Oct 2015 07:00:25 +0000 (09:00 +0200) |
bindings/perl/lib/Collectd/Unixsock.pm | patch | blob | history |
index 5c6a5f9d24c74179b8c2e3a878619198398bdc73..5e79d2682ecbb723ff094f1d12add49b15b72a76 100644 (file)
$self->_socket_chat($msg, sub {
local $_ = shift;
my $ret = shift;
- /^\s*([^:]+):\s*(.*)/ and do {
- $1 =~ s/\s*$//;
- $ret->{$1} = $2;
- };
+ my ( $key, $val );
+ ( $key, $val ) = /^\s*([^:]+):\s*(.*)/ and do {
+ $key =~ s/\s*$//;
+ $ret->{$key} = $val;
+ };
}, $ret
);
return $ret;