From: Matthias Bethke Date: Wed, 10 Sep 2014 16:34:00 +0000 (+0200) Subject: replace Regexp::Common with core Scalar::Util X-Git-Tag: collectd-5.5.0~130^2~3 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=dd2e6520f3c47ca4aeeea57b185a632ee16d39af;p=collectd.git replace Regexp::Common with core Scalar::Util --- diff --git a/bindings/perl/lib/Collectd/Unixsock.pm b/bindings/perl/lib/Collectd/Unixsock.pm index 2b3d8f5e..fdb2bbc0 100644 --- a/bindings/perl/lib/Collectd/Unixsock.pm +++ b/bindings/perl/lib/Collectd/Unixsock.pm @@ -60,7 +60,7 @@ use warnings; use Carp (qw(cluck confess)); use IO::Socket::UNIX; -use Regexp::Common (qw(number)); +use Scalar::Util qw( looks_like_number ); our $Debug = 0; @@ -240,7 +240,7 @@ sub getval # {{{ { $ret->{$1} = undef; } - elsif ($entry =~ m/^(\w+)=($RE{num}{real})$/) + elsif ($entry =~ m/^(\w+)=(.*)$/ and looks_like_number($2)) { $ret->{$1} = 0.0 + $2; }