How To Install perl-namespace-clean on CentOS 7

In this tutorial we learn how to install perl-namespace-clean on CentOS 7. perl-namespace-clean is Keep your namespace tidy

Introduction

In this tutorial we learn how to install perl-namespace-clean on CentOS 7.

What is perl-namespace-clean

When you define a function, or import one, into a Perl package, it will naturally also be available as a method. This does not per se cause problems, but it can complicate subclassing and, for example, plugin classes that are included via multiple inheritance by loading them as base classes. The ’namespace or imported symbols at the end of the current package’s compile cycle. Functions called in the package itself will still be bound by their name, but they won’t show up as methods on your class or instances.

We can use yum or dnf to install perl-namespace-clean on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install perl-namespace-clean.

Install perl-namespace-clean on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install perl-namespace-clean using yum by running the following command:

sudo yum -y install perl-namespace-clean

Install perl-namespace-clean on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install perl-namespace-clean using dnf by running the following command:

sudo dnf -y install perl-namespace-clean

How To Uninstall perl-namespace-clean on CentOS 7

To uninstall only the perl-namespace-clean package we can use the following command:

sudo dnf remove perl-namespace-clean

References

Summary

In this tutorial we learn how to install perl-namespace-clean on CentOS 7 using yum and dnf.