How To Install liblexical-accessor-perl on Ubuntu 18.04

In this tutorial we learn how to install liblexical-accessor-perl on Ubuntu 18.04. liblexical-accessor-perl is true private attributes for Moose/Moo/Mouse

Introduction

In this tutorial we learn how to install liblexical-accessor-perl on Ubuntu 18.04.

What is liblexical-accessor-perl

liblexical-accessor-perl is:

Lexical::Accessor generates coderefs which can be used as methods to access private attributes for objects.

The private attributes are stored inside-out, and do not add any accessors to the class’ namespace, so are completely invisible to any outside code, including any subclasses. This gives your attribute complete privacy: subclasses can define a private (or even public) attribute with the same name as your private one and they will not interfere with each other.

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

Install liblexical-accessor-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 liblexical-accessor-perl using apt-get by running the following command:

sudo apt-get -y install liblexical-accessor-perl

Install liblexical-accessor-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install liblexical-accessor-perl

Install liblexical-accessor-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 Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install liblexical-accessor-perl

How To Uninstall liblexical-accessor-perl on Ubuntu 18.04

To uninstall only the liblexical-accessor-perl package we can use the following command:

sudo apt-get remove liblexical-accessor-perl

Uninstall liblexical-accessor-perl And Its Dependencies

To uninstall liblexical-accessor-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove liblexical-accessor-perl

Remove liblexical-accessor-perl Configurations and Data

To remove liblexical-accessor-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge liblexical-accessor-perl

Remove liblexical-accessor-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge liblexical-accessor-perl

References

Summary

In this tutorial we learn how to install liblexical-accessor-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.