How To Install libmoox-struct-perl on Debian 10
Introduction
In this tutorial we learn how to install libmoox-struct-perl
on Debian 10.
What is libmoox-struct-perl
libmoox-struct-perl is:
MooX::Struct allows you to create cheap struct-like classes for your data using Moo.
While similar in spirit to MooseX::Struct and Class::Struct, MooX::Struct has a somewhat different usage pattern. Rather than providing you with a “struct” keyword which can be used to define structs, you define all the structs as part of the “use” statement. This means they happen at compile time.
A struct is just an “anonymous” Moo class. MooX::Struct creates this class for you, and installs a lexical alias for it in your namespace. Thus your module can create a “Point3D” struct, and some other module can too, and they won’t interfere with each other. All struct classes inherit from MooX::Struct.
There are three methods to install libmoox-struct-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 libmoox-struct-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 libmoox-struct-perl
using apt-get
by running the following command:
sudo apt-get -y install libmoox-struct-perl
Install libmoox-struct-perl Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libmoox-struct-perl
using apt
by running the following command:
sudo apt -y install libmoox-struct-perl
Install libmoox-struct-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 libmoox-struct-perl
using aptitude
by running the following command:
sudo aptitude -y install libmoox-struct-perl
How To Uninstall libmoox-struct-perl on Debian 10
To uninstall only the libmoox-struct-perl
package we can use the following command:
sudo apt-get remove libmoox-struct-perl
Uninstall libmoox-struct-perl And Its Dependencies
To uninstall libmoox-struct-perl
and its dependencies that are no longer needed by Debian 10, we can use the command below:
sudo apt-get -y autoremove libmoox-struct-perl
Remove libmoox-struct-perl Configurations and Data
To remove libmoox-struct-perl
configuration and data from Debian 10 we can use the following command:
sudo apt-get -y purge libmoox-struct-perl
Remove libmoox-struct-perl configuration, data, and all of its dependencies
We can use the following command to remove libmoox-struct-perl
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libmoox-struct-perl
Dependencies
libmoox-struct-perl have the following dependencies:
- libb-hooks-endofscope-perl
- libexporter-tiny-perl
- libmoo-perl
- libnamespace-clean-perl
- libobject-id-perl
- libtype-tiny-perl
- perl
References
Summary
In this tutorial we learn how to install libmoox-struct-perl
package on Debian 10 using different package management tools: apt
, apt-get
and aptitude
.