Spec URL: http://subversion.city-fan.org/repos/cfo-repo/perl-Cwd-Guard/branches/fedora/perl-Cwd-Guard.spec SRPM URL: http://www.city-fan.org/~paul/extras/perl-Cwd-Guard/perl-Cwd-Guard-0.04-2.fc22.src.rpm 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 Fedora Account System Username: pghmcfc
Hmm, the perl comments in your description won't show, as they also happen to be SPEC comments. Is there a way to escape them?
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 >>>
They're visible if there's something else than whitespace before them, so the following would also work: 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 Up to you :) There were no other issues, so I'll approve this now.
New Package SCM Request ======================= Package Name: perl-Cwd-Guard Short Description: Temporarily change the current directory Upstream URL: http://search.cpan.org/dist/Cwd-Guard/ Owners: pghmcfc Branches: f19 f20 f21 epel7 InitialCC: perl-sig Thanks for the review Petr. I'll go for yada yada yada operators: 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
Git done (by process-git-requests).
perl-Software-License-CCpack-1.01-3.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/perl-Software-License-CCpack-1.01-3.el7
perl-Software-License-CCpack-1.01-3.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/perl-Software-License-CCpack-1.01-3.fc20
perl-Software-License-CCpack-1.01-3.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/perl-Software-License-CCpack-1.01-3.fc21
perl-Cwd-Guard-0.04-2.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/perl-Cwd-Guard-0.04-2.el7
perl-Cwd-Guard-0.04-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/perl-Cwd-Guard-0.04-2.fc19
perl-Cwd-Guard-0.04-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/perl-Cwd-Guard-0.04-2.fc20
perl-Cwd-Guard-0.04-2.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/perl-Cwd-Guard-0.04-2.fc21
perl-Cwd-Guard-0.04-2.fc21 has been pushed to the Fedora 21 testing repository.
perl-Software-License-CCpack-1.01-3.fc21 has been pushed to the Fedora 21 stable repository.
perl-Cwd-Guard-0.04-2.fc21 has been pushed to the Fedora 21 stable repository.
perl-Cwd-Guard-0.04-2.fc20 has been pushed to the Fedora 20 stable repository.
perl-Software-License-CCpack-1.01-3.fc20 has been pushed to the Fedora 20 stable repository.
perl-Cwd-Guard-0.04-2.fc19 has been pushed to the Fedora 19 stable repository.
perl-Cwd-Guard-0.04-2.el7 has been pushed to the Fedora EPEL 7 stable repository.
perl-Software-License-CCpack-1.01-3.el7 has been pushed to the Fedora EPEL 7 stable repository.