How To Install libsmart-comments-perl on Ubuntu 18.04

In this tutorial we learn how to install libsmart-comments-perl on Ubuntu 18.04. libsmart-comments-perl is Perl module for comments that do more than just sit there

Introduction

In this tutorial we learn how to install libsmart-comments-perl on Ubuntu 18.04.

What is libsmart-comments-perl

libsmart-comments-perl is:

Smart::Comments is a Perl module that implements “intelligent” comments that can aid in debugging and tracking program execution flow. They can report the value of a variable, track the progress of a loop, and verify that particular assertions are true.

Best of all, when you’re finished debugging, you don’t have to remove them. Simply commenting out the “use Smart::Comments” line turns them back into regular comments. Leaving smart comments in your code is smart because if you needed them once, you’ll almost certainly need them again later.

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

sudo apt-get -y install libsmart-comments-perl

Install libsmart-comments-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libsmart-comments-perl

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

sudo aptitude -y install libsmart-comments-perl

How To Uninstall libsmart-comments-perl on Ubuntu 18.04

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

sudo apt-get remove libsmart-comments-perl

Uninstall libsmart-comments-perl And Its Dependencies

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

sudo apt-get -y autoremove libsmart-comments-perl

Remove libsmart-comments-perl Configurations and Data

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

sudo apt-get -y purge libsmart-comments-perl

Remove libsmart-comments-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libsmart-comments-perl

References

Summary

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