How To Install libmoosex-setonce-perl on Debian 10

Learn how to install libmoosex-setonce-perl on Debian 10 with this tutorial. libmoosex-setonce-perl is module providing write-once, read-many attributes for Moose

Introduction

In this tutorial we learn how to install libmoosex-setonce-perl on Debian 10.

What is libmoosex-setonce-perl

libmoosex-setonce-perl is:

MooseX::SetOnce provides the SetOnce attribute which lets your class have attributes that are not lazy and not set, but that cannot be altered once set.

The logic is very simple: if you try to alter the value of an attribute with the SetOnce trait, either by accessor or writer, and the attribute has a value, it will throw an exception.

If the attribute has a clearer, you may clear the attribute and set it again.

There are three methods to install libmoosex-setonce-perl on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libmoosex-setonce-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libmoosex-setonce-perl using apt-get by running the following command:

sudo apt-get -y install libmoosex-setonce-perl

Install libmoosex-setonce-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libmoosex-setonce-perl using apt by running the following command:

sudo apt -y install libmoosex-setonce-perl

Install libmoosex-setonce-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libmoosex-setonce-perl using aptitude by running the following command:

sudo aptitude -y install libmoosex-setonce-perl

How To Uninstall libmoosex-setonce-perl on Debian 10

To uninstall only the libmoosex-setonce-perl package we can use the following command:

sudo apt-get remove libmoosex-setonce-perl

Uninstall libmoosex-setonce-perl And Its Dependencies

To uninstall libmoosex-setonce-perl and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove libmoosex-setonce-perl

Remove libmoosex-setonce-perl Configurations and Data

To remove libmoosex-setonce-perl configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge libmoosex-setonce-perl

Remove libmoosex-setonce-perl configuration, data, and all of its dependencies

We can use the following command to remove libmoosex-setonce-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libmoosex-setonce-perl

Dependencies

libmoosex-setonce-perl have the following dependencies:

References

Summary

In this tutorial we learn how to install libmoosex-setonce-perl package on Debian 10 using different package management tools: apt, apt-get and aptitude.