How To Install perl-Test-XML on AlmaLinux 8

In this tutorial we learn how to install perl-Test-XML in AlmaLinux 8. perl-Test-XML is Compare XML in perl tests

Introduction

In this tutorial we learn how to install perl-Test-XML on AlmaLinux 8.

What is perl-Test-XML

This module contains generic XML testing tools. Functions include is_xml(GOT, EXPECTED [, TESTNAME ]) This function compares GOT and EXPECTED, both of which are strings of XML. The comparison works semantically and will ignore differences in syntax that are meaningless in xml, such as different quote characters for attributes, order of attributes or empty tag styles. It returns true or false, depending upon test success. isnt_xml(GOT, MUST_NOT_BE [, TESTNAME ]) This function is similar to is_xml(), except that it will fail if GOT and MUST_NOT_BE are identical. is_well_formed_xml(XML [, TESTNAME ]) This function determines whether or not a given XML string is parsable as XML. is_good_xml(XML [, TESTNAME ]) This is an alias for is_well_formed_xml().

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

Install perl-Test-XML on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install perl-Test-XML

Install perl-Test-XML on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install perl-Test-XML

How To Uninstall perl-Test-XML on AlmaLinux 8

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

sudo dnf remove perl-Test-XML

References

Summary

In this tutorial we learn how to install perl-Test-XML on AlmaLinux 8 using yum and dnf.