How To Install perl-DBD-Mock on Rocky Linux 8
Introduction
In this tutorial we learn how to install perl-DBD-Mock
on Rocky Linux 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 Rocky Linux 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 Rocky Linux 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 Rocky Linux 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 Rocky Linux 8
To uninstall only the perl-DBD-Mock
package we can use the following command:
sudo dnf remove perl-DBD-Mock
perl-DBD-Mock Package Contents on Rocky Linux 8
/usr/share/doc/perl-DBD-Mock
/usr/share/doc/perl-DBD-Mock/CONTRIBUTING.md
/usr/share/doc/perl-DBD-Mock/Changes
/usr/share/doc/perl-DBD-Mock/README.md
/usr/share/licenses/perl-DBD-Mock
/usr/share/licenses/perl-DBD-Mock/LICENSE
/usr/share/man/man3/DBD::Mock.3pm.gz
/usr/share/perl5/vendor_perl/DBD
/usr/share/perl5/vendor_perl/DBD/Mock
/usr/share/perl5/vendor_perl/DBD/Mock.pm
/usr/share/perl5/vendor_perl/DBD/Mock/Pool
/usr/share/perl5/vendor_perl/DBD/Mock/Pool.pm
/usr/share/perl5/vendor_perl/DBD/Mock/Pool/db.pm
/usr/share/perl5/vendor_perl/DBD/Mock/Session.pm
/usr/share/perl5/vendor_perl/DBD/Mock/StatementTrack
/usr/share/perl5/vendor_perl/DBD/Mock/StatementTrack.pm
/usr/share/perl5/vendor_perl/DBD/Mock/StatementTrack/Iterator.pm
/usr/share/perl5/vendor_perl/DBD/Mock/db.pm
/usr/share/perl5/vendor_perl/DBD/Mock/dr.pm
/usr/share/perl5/vendor_perl/DBD/Mock/st.pm
References
Summary
In this tutorial we learn how to install perl-DBD-Mock
on Rocky Linux 8 using yum and dnf.