#
# spec file for package perl-File-pushd
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           perl-File-pushd
Version:        1.014
Release:        17.14
%define cpan_name File-pushd
Summary:        Change Directory Temporarily for a Limited Scope
License:        Apache-2.0
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/File-pushd/
Source0:        http://www.cpan.org/authors/id/D/DA/DAGOLDEN/%{cpan_name}-%{version}.tar.gz
Source1:        cpanspec.yml
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Test::More) >= 0.96
%{perl_requires}

%description
File::pushd does a temporary 'chdir' that is easily and automatically
reverted, similar to 'pushd' in some Unix command shells. It works by
creating an object that caches the original working directory. When the
object is destroyed, the destructor calls 'chdir' to revert to the original
working directory. By storing the object in a lexical variable with a
limited scope, this happens automatically at the end of the scope.

This is very handy when working with temporary directories for tasks like
testing; a function is provided to streamline getting a temporary directory
from File::Temp.

For convenience, the object stringifies as the canonical form of the
absolute pathname of the directory entered.

*Warning*: if you create multiple 'pushd' objects in the same lexical
scope, their destruction order is not guaranteed and you might not wind up
in the directory you expect.

%prep
%setup -q -n %{cpan_name}-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes CONTRIBUTING.mkdn examples LICENSE README Todo

%changelog
* Tue Oct 11 2016 coolo@suse.com
- updated to 1.014
  see /usr/share/doc/packages/perl-File-pushd/Changes
  1.014     2016-10-09 23:26:19-04:00 America/New_York
  - No changes from 1.013-TRIAL.
  1.013     2016-10-05 12:57:44-04:00 America/New_York (TRIAL RELEASE)
    [TESTING]
  - Fixed test failures on some 5.8 perls.
  1.011     2016-10-05 12:35:27-04:00 America/New_York (TRIAL RELEASE)
    [CHANGED]
  - pushd/tempd warn if called in void context (GitHub #9 Olivier Mengué)
* Mon Apr 13 2015 coolo@suse.com
- updated to 1.009
  see /usr/share/doc/packages/perl-File-pushd/Changes
  1.009     2014-07-03 13:17:48-04:00 America/New_York
    [FIXED]
  - s/0.95/0.96/ in t/File_pushd.t
  1.008     2014-07-03 13:03:30-04:00 America/New_York
    [FIXED]
  - Require a newer version of Test::More
  1.007     2014-05-30 23:59:02-04:00 America/New_York
    [FIXED]
  - Fixed a testing edge case on Windows
  1.006     2014-03-27 15:29:36-04:00 America/New_York
    [DOCUMENTED]
  - Noted that multiple pushd objects in a lexical scope are not
    destroyed in a predictable order
    [CHANGED]
  - Modernized Dist::Zilla configuration and repo support files
* Tue Jun  4 2013 coolo@suse.com
- updated to 1.005
    [BUG FIXES]
  - Fix failing test for changing to non-existent directory on some
    older Perls for some platforms
  - Object destruction won't clobber $@
    [SUPPORT]
  - Changed issue tracker to Github
  - Dropped support for Perl 5.005
    [BUG FIXES]
  - Fix test failures on Win32 when using perl.exe that must link to gcc
    DLL [rt.cpan.org #81476]
* Wed Feb 15 2012 coolo@suse.com
- updated to 1.002
  - Fix failures on cygwin [RT#73072 Reini Urban]
* Tue Dec 20 2011 coolo@suse.com
- update to 1.001
  - updated docs to clarify that pushd() and tempd() croak on errors
  - if tempd() croaks, error appears at tempd()'s caller, not from within
    tempd() itself
  - warnings enabled if perl version >= 5.006
  - adds 'untaint_pattern' option with a passable default
* Wed Dec  1 2010 coolo@novell.com
- switch to perl_requires macro
* Fri Nov 12 2010 jw@novell.com
- required by publican
- initial package 1.00
  * created by cpanspec 1.78.02