How To Install perl-DBD-Mock on AlmaLinux 8
Introduction
In this tutorial we learn how to install perl-DBD-Mock
on AlmaLinux 8.
What is perl-DBD-Mock
Testing with databases can be tricky. If you are developing a system married to a single database then you can make some assumptions about your environment and ask the user to provide relevant connection information. But if you need to test a framework that uses DBI, particularly a framework that uses different types of persistence schemes, then it may be more useful to simply verify what the framework is trying to do – ensure the right SQL is generated and that the correct parameters are bound. DBD modify your configuration (presumably held outside your code) and just use it instead of DBD
We can use yum
or dnf
to install perl-DBD-Mock
on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install perl-DBD-Mock.
Install perl-DBD-Mock 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-DBD-Mock
using dnf
by running the following command:
sudo dnf -y install perl-DBD-Mock
Install perl-DBD-Mock 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-DBD-Mock
using yum
by running the following command:
sudo yum -y install perl-DBD-Mock
How To Uninstall perl-DBD-Mock on AlmaLinux 8
To uninstall only the perl-DBD-Mock
package we can use the following command:
sudo dnf remove perl-DBD-Mock
References
Summary
In this tutorial we learn how to install perl-DBD-Mock
on AlmaLinux 8 using yum and dnf.