collectd/collectd — pull request #728 by mbethke (2014-09-10 18:09:57+00:00)
Title: Test and clean

I use collectd on CentOS which has Regexp::Common available only via the EPEL repo, deprecated at $WORKPLACE due to its rather mixed code quality. Thus I replaced Regexp::Common by the core module Scalar::Util, and while I was at it improved a few more things:
- Added a small test suite
- Cleaned up some of the Perl style where it was very C-ish, resulting in quite a bit shorter code
- Refactored some common code bits into private methods
- Added a new method listval_filter that is over five times faster (for a common task such as finding all disks for any single host in my particular application - currently 19 hosts with just under 5k metrics; rather more for larger installations) than listval()