How To Install libuniversal-can-perl on Debian 9

In this tutorial we learn how to install libuniversal-can-perl on Debian 9. libuniversal-can-perl is safer version of UNIVERSAL

Introduction

In this tutorial we learn how to install libuniversal-can-perl on Debian 9.

What is libuniversal-can-perl

libuniversal-can-perl is:

The UNIVERSAL class provides a few default methods so that all objects can use them. Object orientation allows programmers to override these methods in subclasses to provide more specific and appropriate behavior.

Some authors call methods in the UNIVERSAL class on potential invocants as functions, bypassing any possible overriding. This is wrong and one should not do it. Unfortunately, not everyone heeds this warning and their bad code can break good code.

This module replaces UNIVERSAL::can() with a method that checks to see if the first argument is a valid invocant (whether an object – a blessed referent – or the name of a class). If so, and if the invocant’s class has its own can() method, it calls that as a method. Otherwise, everything works as you might expect.

If someone attempts to call UNIVERSAL::can() as a function, this module will emit a lexical warning (see perllexwarn) to that effect. You can disable it with no warnings; or no warnings ‘UNIVERSAL::isa’;, but don’t do that; fix the code instead.

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

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

sudo apt-get -y install libuniversal-can-perl

Install libuniversal-can-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libuniversal-can-perl

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

sudo aptitude -y install libuniversal-can-perl

How To Uninstall libuniversal-can-perl on Debian 9

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

sudo apt-get remove libuniversal-can-perl

Uninstall libuniversal-can-perl And Its Dependencies

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

sudo apt-get -y autoremove libuniversal-can-perl

Remove libuniversal-can-perl Configurations and Data

To remove libuniversal-can-perl configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge libuniversal-can-perl

Remove libuniversal-can-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libuniversal-can-perl

Dependencies

libuniversal-can-perl have the following dependencies:

References

Summary

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