How To Install libtest2-harness-perl on Debian 12

Learn how to install libtest2-harness-perl on Debian 12 with this tutorial. libtest2-harness-perl is new and improved test harness with better Test2 integration

Introduction

In this tutorial we learn how to install libtest2-harness-perl on Debian 12.

What is libtest2-harness-perl

libtest2-harness-perl is:

App::Yath (Yet Another Test Harness) is an alternative to App::Prove, and Test2::Harness is an alternative to Test::Harness. It is not designed to replace Test::Harness/prove. Test2::Harness is designed to take full advantage of the rich data Test2 can provide. Test2::Harness is also able to use non-core modules and provide more functionality than prove can achieve with its restrictions.

Test2::Harness is the backend code that handles running/processing the tests. In general a user will not use it directly, instead you should probably be looking at App::Yath which is the UI layer built around Test2::Harness.

To use Test2::Harness, you use the yath command. Yath will find the tests (or use the ones you specify) and run them. As it runs, it will output diagnostic information such as failures. At the end, yath will print a summary of the test run.

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

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

sudo apt-get -y install libtest2-harness-perl

Install libtest2-harness-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libtest2-harness-perl

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

sudo aptitude -y install libtest2-harness-perl

How To Uninstall libtest2-harness-perl on Debian 12

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

sudo apt-get remove libtest2-harness-perl

Uninstall libtest2-harness-perl And Its Dependencies

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

sudo apt-get -y autoremove libtest2-harness-perl

Remove libtest2-harness-perl Configurations and Data

To remove libtest2-harness-perl configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge libtest2-harness-perl

Remove libtest2-harness-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libtest2-harness-perl

Dependencies

libtest2-harness-perl have the following dependencies:

References

Summary

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