8
0
Stephan Kulow
2011-05-30 15:23:06 +00:00
committed by Git OBS Bridge
parent 683674aa80
commit e385b75e65
4 changed files with 56 additions and 29 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b28972506a7a22419cd103ecbfbed7561e8c231643f8404c14ba165cd01c126e
size 25801

3
Path-Class-0.24.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ccdbdbd4fa2e13a4dedd1dd5c238d4f7c92561ea11564806e0676e3b66b091bc
size 27347

View File

@@ -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 Sat Apr 2 19:30:15 UTC 2011 - coolo@novell.com

View File

@@ -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. # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@@ -15,40 +15,20 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: perl-Path-Class Name: perl-Path-Class
Version: 0.23 Version: 0.24
Release: 1 Release: 1
License: GPL+ or Artistic License: GPL+ or Artistic
%define cpan_name Path-Class %define cpan_name Path-Class
Summary: Cross-platform path specification manipulation Summary: Cross-platform path specification manipulation
Url: http://search.cpan.org/dist/Path-Class/ Url: http://search.cpan.org/dist/Path-Class/
Group: Development/Libraries/Perl Group: Development/Libraries/Perl
#Source: http://www.cpan.org/authors/id/K/KW/KWILLIAMS/Path-Class-%{version}.tar.gz Source: http://www.cpan.org/authors/id/K/KW/KWILLIAMS/%{cpan_name}-%{version}.tar.gz
Source: %{cpan_name}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl BuildRequires: perl
BuildRequires: perl(Module::Build)
BuildRequires: perl-macros BuildRequires: perl-macros
BuildRequires: perl(Cwd) BuildRequires: perl(Module::Build) >= 0.3601
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)
%{perl_requires} %{perl_requires}
%description %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 way that won't actually work properly on platforms significantly different
than the ones they've tested their code on. 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 %prep
%setup -q -n %{cpan_name}-%{version} %setup -q -n %{cpan_name}-%{version}
@@ -81,7 +97,7 @@ than the ones they've tested their code on.
%{__rm} -rf %{buildroot} %{__rm} -rf %{buildroot}
%files -f %{name}.files %files -f %{name}.files
%defattr(644,root,root,755) %defattr(-,root,root,755)
%doc Changes README %doc Changes LICENSE README
%changelog %changelog