How To Install libscalar-properties-perl on Ubuntu 18.04

In this tutorial we learn how to install libscalar-properties-perl on Ubuntu 18.04. libscalar-properties-perl is perl module to add run-time properties on scalar variables

Introduction

In this tutorial we learn how to install libscalar-properties-perl on Ubuntu 18.04.

What is libscalar-properties-perl

libscalar-properties-perl is:

Scalar::Properties attempts to make Perl more object-oriented by taking an idea from Ruby: Everything you manipulate is an object, and the results of those manipulations are objects themselves.

‘hello world’->length (-1234)->abs “oh my god, it’s full of properties”->index(‘g’)

The first example asks a string to calculate its length. The second example asks a number to calculate its absolute value. And the third example asks a string to find the index of the letter ‘g’.

Using this module you can have run-time properties on initialized scalar variables and literal values. The word ‘properties’ is used in the Perl 6 sense: out-of-band data, little sticky notes that are attached to the value. While attributes (as in Perl 5’s attribute pragma, and see the Attribute::* family of modules) are handled at compile-time, properties are handled at run-time.

There are three methods to install libscalar-properties-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 libscalar-properties-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 libscalar-properties-perl using apt-get by running the following command:

sudo apt-get -y install libscalar-properties-perl

Install libscalar-properties-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libscalar-properties-perl

Install libscalar-properties-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 libscalar-properties-perl using aptitude by running the following command:

sudo aptitude -y install libscalar-properties-perl

How To Uninstall libscalar-properties-perl on Ubuntu 18.04

To uninstall only the libscalar-properties-perl package we can use the following command:

sudo apt-get remove libscalar-properties-perl

Uninstall libscalar-properties-perl And Its Dependencies

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

sudo apt-get -y autoremove libscalar-properties-perl

Remove libscalar-properties-perl Configurations and Data

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

sudo apt-get -y purge libscalar-properties-perl

Remove libscalar-properties-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libscalar-properties-perl

References

Summary

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