How to Install and Uninstall perl-Data-OptList Package on openSuSE Tumbleweed

Last updated: May 20,2024

1. Install "perl-Data-OptList" package

Please follow the step by step instructions below to install perl-Data-OptList on openSuSE Tumbleweed

$ sudo zypper refresh $ sudo zypper install perl-Data-OptList

2. Uninstall "perl-Data-OptList" package

This tutorial shows how to uninstall perl-Data-OptList on openSuSE Tumbleweed:

$ sudo zypper remove perl-Data-OptList

3. Information about the perl-Data-OptList package on openSuSE Tumbleweed

Information for package perl-Data-OptList:
------------------------------------------
Repository : openSUSE-Tumbleweed-Oss
Name : perl-Data-OptList
Version : 0.114-1.4
Arch : noarch
Vendor : openSUSE
Installed Size : 35.2 KiB
Installed : No
Status : not installed
Source package : perl-Data-OptList-0.114-1.4.src
Upstream URL : https://metacpan.org/release/Data-OptList
Summary : 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.