commit 4643411a18fda0a2cf3661b960b7a4823caa0d05
Author: Paul Howarth <[email protected]>
Date: Tue Oct 7 19:26:10 2014 +0100
Initial import (perl-Cwd-Guard-0.04-2)
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
.gitignore | 1 +
perl-Cwd-Guard.spec | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
3 files changed, 70 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..62ff377 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Cwd-Guard-[0-9.]*.tar.gz
diff --git a/perl-Cwd-Guard.spec b/perl-Cwd-Guard.spec
new file mode 100644
index 0000000..ca56c95
--- /dev/null
+++ b/perl-Cwd-Guard.spec
@@ -0,0 +1,68 @@
+Name: perl-Cwd-Guard
+Version: 0.04
+Release: 2%{?dist}
+Summary: Temporarily change the current directory
+License: GPL+ or Artistic
+URL: http://search.cpan.org/dist/Cwd-Guard/
+Source0:
http://search.cpan.org/CPAN/authors/id/K/KA/KAZEBURO/Cwd-Guard-%{version}.tar.gz
+BuildArch: noarch
+# Module Build
+BuildRequires: perl
+BuildRequires: perl(CPAN::Meta)
+BuildRequires: perl(CPAN::Meta::Prereqs)
+BuildRequires: perl(File::Basename)
+BuildRequires: perl(File::Spec)
+BuildRequires: perl(Module::Build)
+BuildRequires: perl(utf8)
+# Module Runtime
+BuildRequires: perl(constant)
+BuildRequires: perl(Cwd)
+BuildRequires: perl(Exporter)
+BuildRequires: perl(if)
+BuildRequires: perl(parent)
+BuildRequires: perl(strict)
+BuildRequires: perl(warnings)
+# Test Suite
+BuildRequires: perl(Test::More) >= 0.88
+# Runtime
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+
+%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
+
+%prep
+%setup -q -n Cwd-Guard-%{version}
+
+%build
+perl Build.PL --installdirs=vendor
+./Build
+
+%install
+./Build install --destdir=%{buildroot} --create_packlist=0
+
+%check
+./Build test
+
+%files
+%license LICENSE
+%doc Changes README.md
+%{perl_vendorlib}/Cwd/
+%{_mandir}/man3/Cwd::Guard.3*
+
+%changelog
+* Tue Oct 7 2014 Paul Howarth <[email protected]> - 0.04-2
+- Sanitize for Fedora submission
+
+* Sat Oct 4 2014 Paul Howarth <[email protected]> - 0.04-1
+- Initial RPM version
diff --git a/sources b/sources
index e69de29..7fc1e85 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+26d12d3e4313943c7754afeec0f6462c Cwd-Guard-0.04.tar.gz
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/perl-devel