How To Install perl-Test-LWP-UserAgent on CentOS 8

In this tutorial we learn how to install perl-Test-LWP-UserAgent on CentOS 8. perl-Test-LWP-UserAgent is LWP::UserAgent suitable for simulating and testing network calls

Introduction

In this tutorial we learn how to install perl-Test-LWP-UserAgent on CentOS 8.

What is perl-Test-LWP-UserAgent

This module is a subclass of LWP level methods that are concerned with actually sending your request over the network, allowing an interception of that request and simulating a particular response. This greatly facilitates testing of client networking code where the server follows a known protocol.

We can use yum or dnf to install perl-Test-LWP-UserAgent on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install perl-Test-LWP-UserAgent.

Install perl-Test-LWP-UserAgent on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install perl-Test-LWP-UserAgent using yum by running the following command:

sudo yum -y install perl-Test-LWP-UserAgent

Install perl-Test-LWP-UserAgent on CentOS 8 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install perl-Test-LWP-UserAgent using dnf by running the following command:

sudo dnf -y install perl-Test-LWP-UserAgent

How To Uninstall perl-Test-LWP-UserAgent on CentOS 8

To uninstall only the perl-Test-LWP-UserAgent package we can use the following command:

sudo dnf remove perl-Test-LWP-UserAgent

References

Summary

In this tutorial we learn how to install perl-Test-LWP-UserAgent on CentOS 8 using yum and dnf.