Hello community, here is the log from the commit of package perl-Path-Tiny for openSUSE:Factory checked in at 2013-10-21 15:14:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Path-Tiny (Old) and /work/SRC/openSUSE:Factory/.perl-Path-Tiny.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Path-Tiny" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Path-Tiny/perl-Path-Tiny.changes 2013-09-27 17:56:55.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Path-Tiny.new/perl-Path-Tiny.changes 2013-10-21 15:14:23.000000000 +0200 @@ -1,0 +2,15 @@ +Tue Oct 8 15:50:04 UTC 2013 - [email protected] + +- updated to 0.038 + [ADDITIONS] + - Added 'is_rootdir' method to simplify testing if a path is + the root directory + + [FIXES] + - Fixed for v5.8 + + [PREREQS] + - No longer lists 'threads' as a prerequisite. If you have a threaded + perl, you have it and if you're not, Path::Tiny doesn't care. + +------------------------------------------------------------------- Old: ---- Path-Tiny-0.035.tar.gz New: ---- Path-Tiny-0.038.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Path-Tiny.spec ++++++ --- /var/tmp/diff_new_pack.ljmsZd/_old 2013-10-21 15:14:24.000000000 +0200 +++ /var/tmp/diff_new_pack.ljmsZd/_new 2013-10-21 15:14:24.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-Path-Tiny -Version: 0.035 +Version: 0.038 Release: 0 %define cpan_name Path-Tiny Summary: File path utility @@ -29,18 +29,19 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros -BuildRequires: perl(Devel::Hide) BuildRequires: perl(Digest::SHA) >= 5.45 BuildRequires: perl(File::Path) >= 2.07 BuildRequires: perl(File::Spec) >= 3.40 -BuildRequires: perl(File::Temp) >= 0.18 -BuildRequires: perl(File::pushd) -BuildRequires: perl(Test::Deep) -BuildRequires: perl(Test::FailWarnings) -BuildRequires: perl(Test::Fatal) +BuildRequires: perl(File::Temp) >= 0.19 BuildRequires: perl(Test::More) >= 0.96 +#BuildRequires: perl(Path::Class) +#BuildRequires: perl(Path::Tiny) +#BuildRequires: perl(Pod::Wordlist) +#BuildRequires: perl(Test::FailWarnings) +#BuildRequires: perl(Test::Spelling) >= 0.12 +#BuildRequires: perl(TestUtils) +#BuildRequires: perl(Unicode::UTF8) >= 0.58 Requires: perl(Digest::SHA) >= 5.45 -Requires: perl(File::Copy) Requires: perl(File::Path) >= 2.07 Requires: perl(File::Spec) >= 3.40 Requires: perl(File::Temp) >= 0.18 @@ -68,9 +69,6 @@ without CRLF translation. Installing the Unicode::UTF8 manpage 0.58 or later will speed up several of them and is highly recommended. -It uses the autodie manpage internally, so most failures will be thrown as -exceptions. - %prep %setup -q -n %{cpan_name}-%{version} @@ -88,6 +86,6 @@ %files -f %{name}.files %defattr(-,root,root,755) -%doc Changes CONTRIBUTING LICENSE perlcritic.rc README tidyall.ini +%doc Changes CONTRIBUTING cpanfile LICENSE perlcritic.rc README tidyall.ini %changelog ++++++ Path-Tiny-0.035.tar.gz -> Path-Tiny-0.038.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/CONTRIBUTING new/Path-Tiny-0.038/CONTRIBUTING --- old/Path-Tiny-0.035/CONTRIBUTING 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/CONTRIBUTING 2013-10-02 00:20:18.000000000 +0200 @@ -30,9 +30,17 @@ For most distributions, `prove` is entirely sufficent for you to test any patches you have. +### Code style and tidying + +Please try to match any existing coding style. If there is a `.perltidyrc` +file, please install Perl::Tidy and use perltidy before submitting patches. + +If there is a `tidyall.ini` file, you can also install Code::TidyAll and run +`tidyall` on a file or `tidyall -a` to tidy all files. + ### Patching documentation -Likewise, much of the documentation Pod is generated at release time. +Much of the documentation Pod is generated at release time. Depending on the distribution, some documentation may be written in a Pod dialect called WikiDoc. (See Pod::WikiDoc on CPAN.) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/Changes new/Path-Tiny-0.038/Changes --- old/Path-Tiny-0.035/Changes 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/Changes 2013-10-02 00:20:18.000000000 +0200 @@ -1,5 +1,25 @@ Revision history for Path-Tiny +0.038 2013-10-01 18:20:05 America/New_York + + [ADDITIONS] + + - Added 'is_rootdir' method to simplify testing if a path is + the root directory + +0.037 2013-09-25 13:00:25 America/New_York + + [FIXES] + + - Fixed for v5.8 + +0.036 2013-09-25 09:34:28 America/New_York + + [PREREQS] + + - No longer lists 'threads' as a prerequisite. If you have a threaded + perl, you have it and if you're not, Path::Tiny doesn't care. + 0.035 2013-09-24 07:21:55 America/New_York [FIXED] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/META.json new/Path-Tiny-0.038/META.json --- old/Path-Tiny-0.035/META.json 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/META.json 2013-10-02 00:20:18.000000000 +0200 @@ -4,7 +4,7 @@ "David Golden <[email protected]>" ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132660", + "generated_by" : "Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132620", "license" : [ "apache_2_0" ], @@ -59,7 +59,6 @@ "overload" : "0", "perl" : "5.008001", "strict" : "0", - "threads" : "0", "warnings" : "0" } }, @@ -86,15 +85,15 @@ "provides" : { "Path::Tiny" : { "file" : "lib/Path/Tiny.pm", - "version" : "0.035" + "version" : "0.038" }, "Path::Tiny::Error" : { "file" : "lib/Path/Tiny.pm", - "version" : "0.035" + "version" : "0.038" }, "flock" : { "file" : "lib/Path/Tiny.pm", - "version" : "0.035" + "version" : "0.038" } }, "release_status" : "stable", @@ -109,7 +108,7 @@ "web" : "https://github.com/dagolden/Path-Tiny" } }, - "version" : "0.035", + "version" : "0.038", "x_authority" : "cpan:DAGOLDEN", "x_contributors" : [ "Chris Williams <[email protected]>", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/META.yml new/Path-Tiny-0.038/META.yml --- old/Path-Tiny-0.035/META.yml 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/META.yml 2013-10-02 00:20:18.000000000 +0200 @@ -18,7 +18,7 @@ configure_requires: ExtUtils::MakeMaker: 6.17 dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132660' +generated_by: 'Dist::Zilla version 4.300039, CPAN::Meta::Converter version 2.132620' license: apache meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -35,13 +35,13 @@ provides: Path::Tiny: file: lib/Path/Tiny.pm - version: 0.035 + version: 0.038 Path::Tiny::Error: file: lib/Path/Tiny.pm - version: 0.035 + version: 0.038 flock: file: lib/Path/Tiny.pm - version: 0.035 + version: 0.038 recommends: Unicode::UTF8: 0.58 requires: @@ -61,13 +61,12 @@ overload: 0 perl: 5.008001 strict: 0 - threads: 0 warnings: 0 resources: bugtracker: https://github.com/dagolden/Path-Tiny/issues homepage: https://github.com/dagolden/Path-Tiny repository: https://github.com/dagolden/Path-Tiny.git -version: 0.035 +version: 0.038 x_authority: cpan:DAGOLDEN x_contributors: - 'Chris Williams <[email protected]>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/Makefile.PL new/Path-Tiny-0.038/Makefile.PL --- old/Path-Tiny-0.035/Makefile.PL 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/Makefile.PL 2013-10-02 00:20:18.000000000 +0200 @@ -35,7 +35,6 @@ "if" => 0, "overload" => 0, "strict" => 0, - "threads" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { @@ -52,7 +51,7 @@ "lib" => 0, "open" => 0 }, - "VERSION" => "0.035", + "VERSION" => "0.038", "test" => { "TESTS" => "t/*.t" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/README new/Path-Tiny-0.038/README --- old/Path-Tiny-0.035/README 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/README 2013-10-02 00:20:18.000000000 +0200 @@ -2,7 +2,7 @@ Path::Tiny - File path utility VERSION - version 0.035 + version 0.038 SYNOPSIS use Path::Tiny; @@ -256,6 +256,20 @@ Booleans for whether the path appears absolute or relative. + is_rootdir + while ( ! $path->is_rootdir ) { + $path = $path->parent; + ... + } + + Boolean for whether the path is the root directory of the volume. I.e. + the "dirname" is "q[/]" and the "basename" is "q[]". + + This works even on "MSWin32" with drives and UNC volumes: + + path("C:/")->is_rootdir; # true + path("//server/share/")->is_rootdir; #true + iterator $iter = path("/tmp")->iterator( \%options ); @@ -471,11 +485,13 @@ "touch" does. volume - $vol = path("/tmp/foo.txt")->volume; + $vol = path("/tmp/foo.txt")->volume; # "" + $vol = path("C:/tmp/foo.txt")->volume; # "C:" Returns the volume portion of the path. This is equivalent equivalent to what File::Spec would give from "splitpath" and thus usually is the - empty string on Unix-like operating systems. + empty string on Unix-like operating systems or the drive letter for an + absolute path on "MSWin32". EXCEPTION HANDLING Failures will be thrown as exceptions in the class "Path::Tiny::Error". diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/cpanfile new/Path-Tiny-0.038/cpanfile --- old/Path-Tiny-0.035/cpanfile 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/cpanfile 2013-10-02 00:20:18.000000000 +0200 @@ -14,7 +14,6 @@ requires "overload" => "0"; requires "perl" => "5.008001"; requires "strict" => "0"; -requires "threads" => "0"; requires "warnings" => "0"; recommends "Unicode::UTF8" => "0.58"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/dist.ini new/Path-Tiny-0.038/dist.ini --- old/Path-Tiny-0.035/dist.ini 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/dist.ini 2013-10-02 00:20:18.000000000 +0200 @@ -26,6 +26,7 @@ stopwords = stringifying stopwords = subclasses stopwords = touchpath +stopwords = UNC stopwords = unlinked stopwords = utf @@ -36,6 +37,7 @@ remove = Unicode::UTF8 remove = Path::Class remove = Test::FailWarnings +remove = threads ; Digest/Digest::SHA are fine in 5.10.0+ [Prereqs] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/lib/Path/Tiny.pm new/Path-Tiny-0.038/lib/Path/Tiny.pm --- old/Path-Tiny-0.035/lib/Path/Tiny.pm 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/lib/Path/Tiny.pm 2013-10-02 00:20:18.000000000 +0200 @@ -4,7 +4,7 @@ package Path::Tiny; # ABSTRACT: File path utility -our $VERSION = '0.035'; # VERSION +our $VERSION = '0.038'; # VERSION # Dependencies use Exporter 5.57 (qw/import/); @@ -344,6 +344,13 @@ sub is_relative { substr( $_[0]->dirname, 0, 1 ) ne '/' } +sub is_rootdir { + my ($self) = @_; + $self->_splitpath unless defined $self->[DIR]; + return $self->[DIR] eq '/' && $self->[FILE] eq ''; +} + + sub iterator { my $self = shift; my $args = _get_args( shift, qw/recurse follow_symlinks/ ); @@ -700,7 +707,7 @@ =head1 VERSION -version 0.035 +version 0.038 =head1 SYNOPSIS @@ -972,6 +979,21 @@ Booleans for whether the path appears absolute or relative. +=head2 is_rootdir + + while ( ! $path->is_rootdir ) { + $path = $path->parent; + ... + } + +Boolean for whether the path is the root directory of the volume. I.e. the +C<dirname> is C<q[/]> and the C<basename> is C<q[]>. + +This works even on C<MSWin32> with drives and UNC volumes: + + path("C:/")->is_rootdir; # true + path("//server/share/")->is_rootdir; #true + =head2 iterator $iter = path("/tmp")->iterator( \%options ); @@ -1203,11 +1225,13 @@ =head2 volume - $vol = path("/tmp/foo.txt")->volume; + $vol = path("/tmp/foo.txt")->volume; # "" + $vol = path("C:/tmp/foo.txt")->volume; # "C:" Returns the volume portion of the path. This is equivalent equivalent to what L<File::Spec> would give from C<splitpath> and thus -usually is the empty string on Unix-like operating systems. +usually is the empty string on Unix-like operating systems or the +drive letter for an absolute path on C<MSWin32>. =for Pod::Coverage openr_utf8 opena_utf8 openw_utf8 openrw_utf8 openr_raw opena_raw openw_raw openrw_raw diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/t/00-report-prereqs.t new/Path-Tiny-0.038/t/00-report-prereqs.t --- old/Path-Tiny-0.035/t/00-report-prereqs.t 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/t/00-report-prereqs.t 2013-10-02 00:20:18.000000000 +0200 @@ -38,7 +38,6 @@ overload perl strict - threads warnings ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/t/basic.t new/Path-Tiny-0.038/t/basic.t --- old/Path-Tiny-0.035/t/basic.t 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/t/basic.t 2013-10-02 00:20:18.000000000 +0200 @@ -11,7 +11,7 @@ my $file1 = path('foo.txt'); isa_ok( $file1, "Path::Tiny" ); -ok $file1->DOES('Path::Tiny'); +ok $file1->isa('Path::Tiny'); is $file1, 'foo.txt'; ok $file1->is_relative; is $file1->dirname, '.'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/t/parent.t new/Path-Tiny-0.038/t/parent.t --- old/Path-Tiny-0.035/t/parent.t 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/t/parent.t 2013-10-02 00:20:18.000000000 +0200 @@ -13,12 +13,15 @@ if ($DEBUG) { require Path::Class; Path::Class->import } } +my $IS_WIN32 = $^O eq 'MSWin32'; + use Path::Tiny; use File::Spec::Functions qw/canonpath/; sub canonical { my $d = canonpath(shift); $d =~ s{\\}{/}g; + $d .= "/" if $d =~ m{//[^/]+/[^/]+$}; return $d; } @@ -59,6 +62,24 @@ #>>> ); +my @win32_cases = ( + #<<< No perltidy + "absolute with drive" + => [ "C:/foo/bar" => "C:/foo" => "C:/" => "C:/" ], + + "absolute with drive and .." + => [ "C:/foo/bar/../baz" => "C:/foo" => "C:/" ], + + "absolute with UNC" + => [ "//server/share/foo/bar" => "//server/share/foo" => "//server/share/" => "//server/share/" ], + + "absolute with drive, UNC and .." + => [ "//server/share/foo/bar/../baz" => "//server/share/foo" => "//server/share/" ], + #>>> +); + +push @cases, @win32_cases if $IS_WIN32; + while (@cases) { my ( $label, $list ) = splice( @cases, 0, 2 ); subtest $label => sub { @@ -70,11 +91,14 @@ my $got = $path->parent($i); my $s = defined($i) ? $i : "undef"; is( $got, canonical($expect), "parent($s): $path -> $got" ); - is( dir("$path")->parent, canonpath($expect), "Path::Class agrees" ) if $DEBUG; + is( dir("$path")->parent, canonical($expect), "Path::Class agrees" ) if $DEBUG; } $path = $path->parent; shift @$list; } + if ( $path !~ m{\Q..\E} ) { + ok( $path->is_rootdir, "final path is root directory" ); + } }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Path-Tiny-0.035/xt/author/pod-spell.t new/Path-Tiny-0.038/xt/author/pod-spell.t --- old/Path-Tiny-0.035/xt/author/pod-spell.t 2013-09-24 13:22:03.000000000 +0200 +++ new/Path-Tiny-0.038/xt/author/pod-spell.t 2013-10-02 00:20:18.000000000 +0200 @@ -29,6 +29,7 @@ stringifying subclasses touchpath +UNC unlinked utf David -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
