# # spec file for package perl-Path-Class # # 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-Path-Class Version: 0.37 Release: 35.14 %define cpan_name Path-Class Summary: Cross-platform path specification manipulation License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/Path-Class/ Source0: http://www.cpan.org/authors/id/K/KW/KWILLIAMS/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(File::Spec) >= 3.26 BuildRequires: perl(Module::Build) >= 0.360100 BuildRequires: perl(Perl::OSType) BuildRequires: perl(parent) Requires: perl(File::Spec) >= 3.26 Requires: perl(Perl::OSType) Requires: perl(parent) %{perl_requires} %description 'Path::Class' is a module for manipulation of file and directory specifications (strings describing their locations, like ''/home/ken/foo.txt'' or ''C:\Windows\Foo.txt'') in a cross-platform manner. It supports pretty much every platform Perl runs on, including Unix, Windows, Mac, VMS, Epoc, Cygwin, OS/2, and NetWare. The well-known module File::Spec also provides this service, but it's sort of awkward to use well, so people sometimes avoid it, or use it in a way that won't actually work properly on platforms significantly different than the ones they've tested their code on. In fact, 'Path::Class' uses 'File::Spec' internally, wrapping all the unsightly details so you can concentrate on your application code. Whereas 'File::Spec' provides functions for some common path manipulations, 'Path::Class' provides an object-oriented model of the world of path specifications and their underlying semantics. 'File::Spec' doesn't create any objects, and its classes represent the different ways in which paths must be manipulated on various platforms (not a very intuitive concept). 'Path::Class' creates objects representing files and directories, and provides methods that relate them to each other. For instance, the following 'File::Spec' code: my $absolute = File::Spec->file_name_is_absolute( File::Spec->catfile( @dirs, $file ) ); can be written using 'Path::Class' as my $absolute = Path::Class::File->new( @dirs, $file )->is_absolute; or even as my $absolute = file( @dirs, $file )->is_absolute; Similar readability improvements should happen all over the place when using 'Path::Class'. Using 'Path::Class' can help solve real problems in your code too - for instance, how many people actually take the "volume" (like 'C:' on Windows) into account when writing 'File::Spec'-using code? I thought not. But if you use 'Path::Class', your file and directory objects will know what volumes they refer to and do the right thing. The guts of the 'Path::Class' code live in the Path::Class::File and Path::Class::Dir modules, so please see those modules' documentation for more details about how to use them. %prep %setup -q -n %{cpan_name}-%{version} %build %{__perl} Build.PL installdirs=vendor ./Build build flags=%{?_smp_mflags} %check ./Build test %install ./Build install destdir=%{buildroot} create_packlist=0 %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc Changes LICENSE README %changelog * Mon Aug 15 2016 coolo@suse.com - updated to 0.37 see /usr/share/doc/packages/perl-Path-Class/Changes 0.37 Sat Aug 13 21:33:23 CDT 2016 - Doc update for contains/subsumes [1916528] - Fix "contains" when $self is a relative path - #43 [1c01e86] - Handle case where $other evaluates false [70e4b6b] - Add additional test cases for contains and subsumes [434f244] - Test with Perl 5.24 [a4d2d73] * Fri Feb 19 2016 coolo@suse.com - updated to 0.36 see /usr/share/doc/packages/perl-Path-Class/Changes 0.36 Tue Feb 16 22:16:21 CST 2016 - 117bd64 - Use croak instead of die; use eval syntax instead of universal::isa (as perlcritic wishes) - 4b620b6 - Load File::Copy and Perl::OSType only when used (copy_to, move_to) - 55ecb58 - always use canonpath on arguments to splitdir - 25c12f7 - Fix 'Operation "eq": no method found' error (RT #77259), whose underlying cause isn't really understood. - 935eeed - Add some fixes & tests for contains() with updir stuff (github #43) - 927fa74 - Fix Carp::Croak to Carp::croak - 2d615ca 34da6d3 5fcad02 1b7be68 a622acf - Fixed and improved Travis testing configuration - 2a74c40 - Fix Pod typos <Сергей Романов> - 28ca95a - Check all print calls in spew and explicitly call (and check) close * Tue Sep 16 2014 coolo@suse.com - updated to 0.35 - fce4b8e - Fixed a t/03-filesystem.t test error on Windows - df23e17 - Add a new spew_lines() method - 3ffef39 - Don't convert file into directory in subsumes() - 9a01a71 - Updated POD for copy_to and move_to methods - 210a7ef - Stringify destination for copy_to method - 9f83723 - Stringify destination for move_to method - 5e2cb26, d5c7e62 - Add Continuous Integration with Travis CI - d372be1 - Change bugtracker to github's * Wed Dec 18 2013 coolo@suse.com - updated to 0.33 - New copy_to() and move_to() methods. [Robert Rothenberg & Ken Williams] - As advised in the utime() docs, pass undef as the time for touch(). - Do a better job cleaning up temp files in the tests. - Optimization: use parent.pm instead of base.pm. [Olivier Mengué] - Changed the docs to show that file() and dir() are exported by default. - Fixed spelling error in POD. [Salvatore Bonaccorso] * Sun Jun 9 2013 coolo@suse.com - updated to 0.32 - Updated dependency on File::Spec to 3.26, fixing RT #83143. - Fixed bug with leading empty string in dir() - became unintentional UNC path on Cygwin. [David Golden and MITHUN@cpan.org] - Fixed "Unterminated C<...> sequence" in Pod. [Olaf Alders] 0.31 Tue Feb 5 11:51:59 CST 2013 - Optimization: stringify variables passed to canonpath [David Golden] - Optimization: Use internal guts when constructing Dirs from Dirs, instead of concatenating and splitting them again with File::Spec. [David Golden] - Fix grammar error in docs. [Karen Etheridge] - Implement a 'split' parameter for the slurp() method [suggested by Yanick Champoux] - In docs, replace unicode MINUS SIGN with ascii HYPHEN-MINUS [Randy Stauner] 0.29 Mon Dec 17 23:55:07 CST 2012 - Add components() method, which returns directory names (and filename, if this is a File object) as a list. - Fix a test failure on non-Unix platforms, the 07-recurseprune.t test was written in a Unix-specific way. 0.28 Sat Dec 15 21:40:17 CST 2012 - Fix test failures when run as root - they were relying on permissions failures, but permissions never fail as root. [Spotted by AAR and Chris Williams] - Add links in docs to the other modules we rely on & talk about in the docs. Makes for easier viewing through search.cpan.org / MetaCPAN. [David Precious] - Fixed some misleading variable names in docs. [RT#81795] [Pau Amma] 0.27 Sat Dec 8 19:24:15 CST 2012 - Added pruning support in dir->recurse(). If recurse callback returns $item->PRUNE, no children of this item will be analyzed. [Marcin Kasperski] - Documented 'basename' method for directories. [Fabrice Gabolde] - Added traverse_if() function, which allows one to filter children * Tue May 29 2012 coolo@suse.com - it should work with all Module::Build * Mon Feb 27 2012 coolo@suse.com - updated to 0.25 - resolve() now croak()s instead of die()s on non-existent file. [Danijel Tašov] - Added a traverse() method for directories, based on the fmap_cont() method of Forest::Tree::Pure. It's an alternative to ->recurse, which allows for more control over how the recursion happens. [Jesse Luehrs] - Fixed a grammar error in the docs. [Shlomi Fish] * Mon May 30 2011 coolo@novell.com - updated to 0.24 - Added a tempfile() method for Dir objects, which provides an interface to File::Temp. [RT#60485] - Fixed a non-helpful fatal error message when calling resolve() on a path that doesn't exist. Now dies with the proper "No such file or directory" message & exit status. [GRAF] * Sat Apr 2 2011 coolo@novell.com - update to 0.23: - Fixed a bunch of problems with the distribution (e.g. in META.yml) that I introduced in the switch to Dist::Zilla. No code changes from 0.22. * Sun Dec 26 2010 pascal.bleser@opensuse.org - update to 0.22: * added a basename() method for directory objects - changes from 0.21: * don't test the 'iomode' option under 5.6, because layers aren't supported yet * fixes to spelling errors in the docmuentation * Tue Nov 30 2010 coolo@novell.com - switch to perl_requires macro * Mon Aug 9 2010 chris@computersalat.de - update to 0.19 - slurp() now accepts an 'iolayers' option to control how the file is opened. [Graham Barr] - In the openr() and openw() file methods, we now croak() instead of die() so that the error messages are more useful. [Ian Sillitoe] - Allow subclassing, by adding dir_class() and file_class() static methods, allowing them to be overridden. [Matt Trout & John LoVerso & Michael Schwern] - Fixed a testing failure that could occur whenever testing in a directory path that contains symlinks (e.g. /tmp on Mac OS X). - Added a 'no_hidden' parameter for children() [EDENC ] - Fixed the heading for the is_relative() POD section. [CUB ] - 0.18 - Sun Dec 20 10:11:02 CST 2009 - Similar to the next() bug for files/directories named "0" or "0.0" in the previous release, the children() and recurse() methods have now been fixed in the same way. [spotted by ARTHAS, MSISK] - 0.17 - Sun Jun 14 21:42:16 2009 - dir(undef) now returns undef rather than the rootdir, because undef was probably a mistake by the caller, and the rootdir is too scary a default. [Suggested by John Goulah] - Temporary files during testing are now created in the system temp directory, rather than somewhere in t/ . See RT #31382. [Suggested by Alex Page] - Added is_relative() as the obvious complement to the existing is_absolute() method. - Added a resolve() method to clean up paths much more thoroughly than cleanup(), e.g. resolving symlinks, collapsing foo/../bar sections, etc. [Suggested by David Garamond] - Fixed a problem in which a file/directory called "0" or "0.0" would end a loop prematurely when using the idiom 'while($x = $dir->next) {...}'. See http://rt.cpan.org/Ticket/Display.html?id=29374 [Spotted by Daniel Lo] - Fixed an exists($array[$i]) that prevented compatibility with perl 5.005. - Moved the repository from my personal CVS repo to Google Code. - recreated by cpanspec 1.78 - noarch pkg * Sun Jan 10 2010 jengelh@medozas.de - enable parallel build * Mon Aug 20 2007 mrueckert@suse.de - initial package