Name: | perl-Cwd-Guard |
Version: | 0.05 |
Release: | 21.el10_0 |
Architecture: | noarch |
Group: | Unspecified |
Size: | 22923 |
License: | GPL-1.0-or-later OR Artistic-1.0-Perl |
RPM: |
perl-Cwd-Guard-0.05-21.el10_0.noarch.rpm
|
Source RPM: |
perl-Cwd-Guard-0.05-21.el10_0.src.rpm
|
Build Date: | Thu Dec 19 2024 |
Build Host: | build-ol10-x86_64.oracle.com |
Vendor: | Oracle America |
URL: | https://metacpan.org/release/Cwd-Guard |
Summary: | Temporarily change the current directory |
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 |