|
NAMECwd::Guard - Temporary changing working directory (chdir) SYNOPSIS 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
DESCRIPTIONCORE::chdir Cwd:: Guard can change the current directory (chdir) using a limited scope. FUNCTIONS
AUTHORMasahiro Nagano <kazeburo {at} gmail.com> SEE ALSOFile::chdir, File::pushd LICENSECopyright (C) Masahiro Nagano This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|