From e385b75e65327cb51ff1928b99b3a849c9ecd6e4422b77a8c17a5fbd51d5f77a Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 30 May 2011 15:23:06 +0000 Subject: [PATCH] update OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Path-Class?expand=0&rev=15 --- Path-Class-0.23.tar.gz | 3 -- Path-Class-0.24.tar.gz | 3 ++ perl-Path-Class.changes | 11 +++++++ perl-Path-Class.spec | 68 +++++++++++++++++++++++++---------------- 4 files changed, 56 insertions(+), 29 deletions(-) delete mode 100644 Path-Class-0.23.tar.gz create mode 100644 Path-Class-0.24.tar.gz diff --git a/Path-Class-0.23.tar.gz b/Path-Class-0.23.tar.gz deleted file mode 100644 index 9dcdde6..0000000 --- a/Path-Class-0.23.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b28972506a7a22419cd103ecbfbed7561e8c231643f8404c14ba165cd01c126e -size 25801 diff --git a/Path-Class-0.24.tar.gz b/Path-Class-0.24.tar.gz new file mode 100644 index 0000000..ce26faf --- /dev/null +++ b/Path-Class-0.24.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccdbdbd4fa2e13a4dedd1dd5c238d4f7c92561ea11564806e0676e3b66b091bc +size 27347 diff --git a/perl-Path-Class.changes b/perl-Path-Class.changes index c143018..df5f914 100644 --- a/perl-Path-Class.changes +++ b/perl-Path-Class.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Mon May 30 15:21:07 UTC 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 19:30:15 UTC 2011 - coolo@novell.com diff --git a/perl-Path-Class.spec b/perl-Path-Class.spec index f1ccff0..afc1ed1 100644 --- a/perl-Path-Class.spec +++ b/perl-Path-Class.spec @@ -1,5 +1,5 @@ # -# spec file for package perl-Path-Class +# spec file for package perl-Path-Class (Version 0.24) # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -15,40 +15,20 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: perl-Path-Class -Version: 0.23 +Version: 0.24 Release: 1 License: GPL+ or Artistic %define cpan_name Path-Class Summary: Cross-platform path specification manipulation Url: http://search.cpan.org/dist/Path-Class/ Group: Development/Libraries/Perl -#Source: http://www.cpan.org/authors/id/K/KW/KWILLIAMS/Path-Class-%{version}.tar.gz -Source: %{cpan_name}-%{version}.tar.gz +Source: http://www.cpan.org/authors/id/K/KW/KWILLIAMS/%{cpan_name}-%{version}.tar.gz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl -BuildRequires: perl(Module::Build) BuildRequires: perl-macros -BuildRequires: perl(Cwd) -BuildRequires: perl(File::Path) -BuildRequires: perl(File::Spec) >= 0.87 -BuildRequires: perl(File::Spec::Mac) >= 1.3 -BuildRequires: perl(File::stat) -BuildRequires: perl(File::Temp) -BuildRequires: perl(IO::Dir) -BuildRequires: perl(IO::File) -BuildRequires: perl(overload) -Requires: perl(Cwd) -Requires: perl(File::Path) -Requires: perl(File::Spec) >= 0.87 -Requires: perl(File::Spec::Mac) >= 1.3 -Requires: perl(File::stat) -Requires: perl(IO::Dir) -Requires: perl(IO::File) -Requires: perl(overload) +BuildRequires: perl(Module::Build) >= 0.3601 %{perl_requires} %description @@ -63,6 +43,42 @@ 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} @@ -81,7 +97,7 @@ than the ones they've tested their code on. %{__rm} -rf %{buildroot} %files -f %{name}.files -%defattr(644,root,root,755) -%doc Changes README +%defattr(-,root,root,755) +%doc Changes LICENSE README %changelog