How To Install perl-TryCatch on Fedora 36

In this tutorial we learn how to install perl-TryCatch in Fedora 36. perl-TryCatch is First class try catch semantics for Perl, without source filters

Introduction

In this tutorial we learn how to install perl-TryCatch on Fedora 36.

What is perl-TryCatch

This module aims to provide a nicer syntax and method to catch errors in Perl, similar to what is found in other languages (such as Java, Python or C++). The standard method of using eval {}; if ($@) {} is often prone to subtle bugs, primarily that its far too easy to stomp on the error in error handlers. And also eval/if isn’t the nicest idiom.

We can use yum or dnf to install perl-TryCatch on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install perl-TryCatch.

Install perl-TryCatch 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-TryCatch using dnf by running the following command:

sudo dnf -y install perl-TryCatch

Install perl-TryCatch 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-TryCatch using yum by running the following command:

sudo yum -y install perl-TryCatch

How To Uninstall perl-TryCatch on Fedora 36

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

sudo dnf remove perl-TryCatch

perl-TryCatch Package Contents on Fedora 36

/usr/lib/.build-id
/usr/lib/.build-id/b3
/usr/lib/.build-id/b3/fd230bc203195e5510867848ab3d7eb09c33ad
/usr/lib64/perl5/vendor_perl/TryCatch.pm
/usr/lib64/perl5/vendor_perl/auto/TryCatch
/usr/lib64/perl5/vendor_perl/auto/TryCatch/TryCatch.so
/usr/share/doc/perl-TryCatch
/usr/share/doc/perl-TryCatch/Changes
/usr/share/doc/perl-TryCatch/README
/usr/share/doc/perl-TryCatch/eg
/usr/share/doc/perl-TryCatch/eg/bench.pl
/usr/share/doc/perl-TryCatch/eg/bench_ok.pl
/usr/share/man/man3/TryCatch.3pm.gz

References

Summary

In this tutorial we learn how to install perl-TryCatch on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).