How To Install perl-smartmatch on Fedora 36
Introduction
In this tutorial we learn how to install perl-smartmatch on Fedora 36.
What is perl-smartmatch
This module allows you to override the behavior of the smart match operator ("~~"). “use smartmatch $matcher” hooks into the compiler to replace the smartmatch opcode with a call to a custom subroutine, specified either as a coderef or as a string, which will have “smartmatch it and used as the name of a package in which to find a subroutine named “match”. The subroutine will be called with two arguments, the values on the left and right sides of the smart match operator, and should return the result.
We can use yum or dnf to install perl-smartmatch on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install perl-smartmatch.
Install perl-smartmatch on Fedora 36 Using dnf
Update yum database with dnf using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install perl-smartmatch using dnf by running the following command:
sudo dnf -y install perl-smartmatch
Install perl-smartmatch on Fedora 36 Using yum
Update yum database with yum using the following command.
sudo yum makecache --refresh
After updating yum database, We can install perl-smartmatch using yum by running the following command:
sudo yum -y install perl-smartmatch
How To Uninstall perl-smartmatch on Fedora 36
To uninstall only the perl-smartmatch package we can use the following command:
sudo dnf remove perl-smartmatch
perl-smartmatch Package Contents on Fedora 36
/usr/lib/.build-id
/usr/lib/.build-id/5d
/usr/lib/.build-id/5d/c6572b9204ee0067099d2d9315db91fa79d759
/usr/lib64/perl5/vendor_perl/auto/smartmatch
/usr/lib64/perl5/vendor_perl/auto/smartmatch/smartmatch.so
/usr/lib64/perl5/vendor_perl/smartmatch.pm
/usr/share/doc/perl-smartmatch
/usr/share/doc/perl-smartmatch/Changes
/usr/share/doc/perl-smartmatch/README
/usr/share/licenses/perl-smartmatch
/usr/share/licenses/perl-smartmatch/LICENSE
/usr/share/man/man3/smartmatch.3pm.gz
References
Summary
In this tutorial we learn how to install perl-smartmatch on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).