[Bug 1150113] Review Request: perl-Cwd-Guard - Temporarily change the current directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1150113



--- Comment #2 from Paul Howarth <paul@xxxxxxxxxxxx> ---
I've tried a few things, including macros, but nothing seems to work.

Could possibly use a sort of pseudo-code instead, e.g.:

  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";
    <<< directory is now /tmp/xxxxx >>>
  }
  <<< directory is now back to $dir >>>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review





[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]