How to Install and Uninstall perl-Cwd-Guard.noarch Package on Red Hat Enterprise Linux 8 (RHEL 8)

Last updated: October 10,2024

1. Install "perl-Cwd-Guard.noarch" package

This tutorial shows how to install perl-Cwd-Guard.noarch on Red Hat Enterprise Linux 8 (RHEL 8)

$ sudo dnf update $ sudo dnf install perl-Cwd-Guard.noarch

2. Uninstall "perl-Cwd-Guard.noarch" package

This is a short guide on how to uninstall perl-Cwd-Guard.noarch on Red Hat Enterprise Linux 8 (RHEL 8):

$ sudo dnf remove perl-Cwd-Guard.noarch $ sudo dnf autoremove

3. Information about the perl-Cwd-Guard.noarch package on Red Hat Enterprise Linux 8 (RHEL 8)

Last metadata expiration check: 0:57:32 ago on Mon Feb 26 15:59:38 2024.
Available Packages
Name : perl-Cwd-Guard
Version : 0.05
Release : 11.el8
Architecture : noarch
Size : 20 k
Source : perl-Cwd-Guard-0.05-11.el8.src.rpm
Repository : epel
Summary : Temporarily change the current directory
URL : https://metacpan.org/release/Cwd-Guard
License : GPL+ or Artistic
Description : Cwd::Guard can change the current directory (chdir) using a limited scope.
:
: use Cwd::Guard qw/cwd_guard/;
: use Cwd;
:
: my $dir = getcwd;
: MYBLOCK: {
: my $guard = cwd_guard('/tmp/xxxxx') or die
: "failed chdir: $Cwd::Guard::Error";
: ... # chdir to /tmp/xxxxx
: }
: ... # back to $dir