Logoj0ke.net Open Build Service > Projects > server:monitoring > nagios-plugins-nwc-health > Binaries > nagios-plugins-nwc-health-8... > Dependencies
Sign Up | Log In

Dependency of nagios-plugins-nwc-health-8.0-1.1.src.rpm

Name: perl-Data-OptList

Project: openSUSE_13.2

Repository: oss

Title: parse and validate simple name/value option pairs

Description:
Hashes are great for storing named data, but if you want more than one
entry for a name, you have to use a list of pairs. Even then, this is
really boring to write:

$values = [
foo => undef,
bar => undef,
baz => undef,
xyz => { ... },
];

Just look at all those undefs! Don't worry, we can get rid of those:

$values = [
map { $_ => undef } qw(foo bar baz),
xyz => { ... },
];

Aaaauuugh! We've saved a little typing, but now it requires thought to
read, and thinking is even worse than typing... and it's got a bug! It
looked right, didn't it? Well, the 'xyz => { ... }' gets consumed by the
map, and we don't get the data we wanted.

With Data::OptList, you can do this instead:

$values = Data::OptList::mkopt([
qw(foo bar baz),
xyz => { ... },
]);

This works by assuming that any defined scalar is a name and any reference
following a name is its value.

Version: 0.109

Release: 2.1.3

Architecture: noarch

Size: 18.5 KB

Build Time: 2014-10-06 16:42:29 +0200 (over 9 years ago)

Provides

Symbol Required by
perl(Data::OptList) = 0.109 perl-Moose perl-syntax perl-Sub-Exporter perl-App-Cmd perl-Class-Load
perl-Data-OptList = 0.109-2...

Requires

Symbol Provided by
perl(:MODULE_COMPAT_5.20.1) perl
perl(Params::Util) perl-Params-Util
perl(Sub::Install) >= 0.921 perl-Sub-Install