Hello community,

here is the log from the commit of package perl-Path-Tiny for openSUSE:Factory 
checked in at 2017-02-22 13:44:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    
2017-02-16 16:46:51.342595558 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Path-Tiny.new/perl-Path-Tiny.changes       
2017-02-22 13:44:50.290598505 +0100
@@ -1,0 +2,32 @@
+Sat Feb 18 07:12:28 UTC 2017 - [email protected]
+
+- updated to 0.104
+   see /usr/share/doc/packages/perl-Path-Tiny/Changes
+
+  0.104     2017-02-17 07:17:00-05:00 America/New_York
+  
+      - No changes from 0.103-TRIAL.
+  
+  0.103     2017-02-10 17:25:06-05:00 America/New_York (TRIAL RELEASE)
+  
+      [Bug fixes]
+  
+      - Path::Tiny 0.101 on Windows made `$path->absolute("/foo")` return an
+        absolute path starting with 'C:/foo', which was an unintentional
+        behavior change.  This release now uses any absolute base without
+        further normalization.
+  
+  0.101     2017-02-05 09:56:46-05:00 America/New_York (TRIAL RELEASE)
+  
+      [Changes]
+  
+      - The 'absolute' method now always returns an absolute path, even if a
+        user provided a relative path for the base path.  The old, odd
+        behavior was documented, but people often don't read docs.  The new
+        behavior avoids suprises.
+  
+      [Additions]
+  
+      - Added 'cached_temp' method.
+
+-------------------------------------------------------------------

Old:
----
  Path-Tiny-0.100.tar.gz

New:
----
  Path-Tiny-0.104.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Path-Tiny.spec ++++++
--- /var/tmp/diff_new_pack.2VRbft/_old  2017-02-22 13:44:50.898511921 +0100
+++ /var/tmp/diff_new_pack.2VRbft/_new  2017-02-22 13:44:50.898511921 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Path-Tiny
-Version:        0.100
+Version:        0.104
 Release:        0
 %define cpan_name Path-Tiny
 Summary:        File path utility

++++++ Path-Tiny-0.100.tar.gz -> Path-Tiny-0.104.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Path-Tiny-0.100/Changes new/Path-Tiny-0.104/Changes
--- old/Path-Tiny-0.100/Changes 2017-01-15 04:48:32.000000000 +0100
+++ new/Path-Tiny-0.104/Changes 2017-02-17 13:17:37.000000000 +0100
@@ -1,5 +1,31 @@
 Revision history for Path-Tiny
 
+0.104     2017-02-17 07:17:00-05:00 America/New_York
+
+    - No changes from 0.103-TRIAL.
+
+0.103     2017-02-10 17:25:06-05:00 America/New_York (TRIAL RELEASE)
+
+    [Bug fixes]
+
+    - Path::Tiny 0.101 on Windows made `$path->absolute("/foo")` return an
+      absolute path starting with 'C:/foo', which was an unintentional
+      behavior change.  This release now uses any absolute base without
+      further normalization.
+
+0.101     2017-02-05 09:56:46-05:00 America/New_York (TRIAL RELEASE)
+
+    [Changes]
+
+    - The 'absolute' method now always returns an absolute path, even if a
+      user provided a relative path for the base path.  The old, odd
+      behavior was documented, but people often don't read docs.  The new
+      behavior avoids suprises.
+
+    [Additions]
+
+    - Added 'cached_temp' method.
+
 0.100     2017-01-14 22:47:55-05:00 America/New_York
 
     - No changes from 0.099-TRIAL.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Path-Tiny-0.100/META.json 
new/Path-Tiny-0.104/META.json
--- old/Path-Tiny-0.100/META.json       2017-01-15 04:48:32.000000000 +0100
+++ new/Path-Tiny-0.104/META.json       2017-02-17 13:17:37.000000000 +0100
@@ -111,11 +111,11 @@
    "provides" : {
       "Path::Tiny" : {
          "file" : "lib/Path/Tiny.pm",
-         "version" : "0.100"
+         "version" : "0.104"
       },
       "Path::Tiny::Error" : {
          "file" : "lib/Path/Tiny.pm",
-         "version" : "0.100"
+         "version" : "0.104"
       }
    },
    "release_status" : "stable",
@@ -130,11 +130,12 @@
          "web" : "https://github.com/dagolden/Path-Tiny";
       }
    },
-   "version" : "0.100",
+   "version" : "0.104",
    "x_authority" : "cpan:DAGOLDEN",
    "x_contributors" : [
       "Alex Efros <[email protected]>",
       "Chris Williams <[email protected]>",
+      "Dave Rolsky <[email protected]>",
       "David Steinbrunner <[email protected]>",
       "Doug Bell <[email protected]>",
       "Gabor Szabo <[email protected]>",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Path-Tiny-0.100/META.yml new/Path-Tiny-0.104/META.yml
--- old/Path-Tiny-0.100/META.yml        2017-01-15 04:48:32.000000000 +0100
+++ new/Path-Tiny-0.104/META.yml        2017-02-17 13:17:37.000000000 +0100
@@ -35,10 +35,10 @@
 provides:
   Path::Tiny:
     file: lib/Path/Tiny.pm
-    version: '0.100'
+    version: '0.104'
   Path::Tiny::Error:
     file: lib/Path/Tiny.pm
-    version: '0.100'
+    version: '0.104'
 recommends:
   Unicode::UTF8: '0.58'
 requires:
@@ -64,11 +64,12 @@
   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.100'
+version: '0.104'
 x_authority: cpan:DAGOLDEN
 x_contributors:
   - 'Alex Efros <[email protected]>'
   - 'Chris Williams <[email protected]>'
+  - 'Dave Rolsky <[email protected]>'
   - 'David Steinbrunner <[email protected]>'
   - 'Doug Bell <[email protected]>'
   - 'Gabor Szabo <[email protected]>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Path-Tiny-0.100/Makefile.PL 
new/Path-Tiny-0.104/Makefile.PL
--- old/Path-Tiny-0.100/Makefile.PL     2017-01-15 04:48:32.000000000 +0100
+++ new/Path-Tiny-0.104/Makefile.PL     2017-02-17 13:17:37.000000000 +0100
@@ -46,7 +46,7 @@
     "lib" => 0,
     "open" => 0
   },
-  "VERSION" => "0.100",
+  "VERSION" => "0.104",
   "test" => {
     "TESTS" => "t/*.t"
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Path-Tiny-0.100/README new/Path-Tiny-0.104/README
--- old/Path-Tiny-0.100/README  2017-01-15 04:48:32.000000000 +0100
+++ new/Path-Tiny-0.104/README  2017-02-17 13:17:37.000000000 +0100
@@ -2,7 +2,7 @@
     Path::Tiny - File path utility
 
 VERSION
-    version 0.100
+    version 0.104
 
 SYNOPSIS
       use Path::Tiny;
@@ -192,6 +192,10 @@
 
         my $lost = tempdir()->child("foo"); # tempdir cleaned up right away
 
+    Note 4: The cached object may be accessed with the "cached_temp" method.
+    Keeping a reference to, or modifying the cached object may break the
+    behavior documented above and is not supported. Use at your own risk.
+
     Current API available since 0.097.
 
 METHODS
@@ -200,9 +204,10 @@
         $abs = path("foo/bar")->absolute("/tmp");
 
     Returns a new "Path::Tiny" object with an absolute path (or itself if
-    already absolute). Unless an argument is given, the current directory is
-    used as the absolute base path. The argument must be absolute or you
-    won't get an absolute result.
+    already absolute). If no argument is given, the current directory is
+    used as the absolute base path. If an argument is given, it will be
+    converted to an absolute path (if it is not already) and used as the
+    absolute base path.
 
     This will not resolve upward directories ("foo/../bar") unless
     "canonpath" in File::Spec would normally do so on your platform. If you
@@ -212,7 +217,7 @@
     On Windows, an absolute path without a volume component will have it
     added based on the current drive.
 
-    Current API available since 0.001.
+    Current API available since 0.101.
 
   append, append_raw, append_utf8
         path("foo.txt")->append(@data);
@@ -279,6 +284,17 @@
 
     Current API available since 0.001.
 
+  cached_temp
+    Returns the cached "File::Temp" or "File::Temp::Dir" object if the
+    "Path::Tiny" object was created with "/tempfile" or "/tempdir". If there
+    is no such object, this method throws.
+
+    WARNING: Keeping a reference to, or modifying the cached object may
+    break the behavior documented for temporary files and directories
+    created with "Path::Tiny" and is not supported. Use at your own risk.
+
+    Current API available since 0.101.
+
   child
         $file = path("/tmp")->child("foo.txt"); # "/tmp/foo.txt"
         $file = path("/tmp")->child(@parts);
@@ -1021,6 +1037,8 @@
 
     *   Chris Williams <[email protected]>
 
+    *   Dave Rolsky <[email protected]>
+
     *   David Steinbrunner <[email protected]>
 
     *   Doug Bell <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Path-Tiny-0.100/lib/Path/Tiny.pm 
new/Path-Tiny-0.104/lib/Path/Tiny.pm
--- old/Path-Tiny-0.100/lib/Path/Tiny.pm        2017-01-15 04:48:32.000000000 
+0100
+++ new/Path-Tiny-0.104/lib/Path/Tiny.pm        2017-02-17 13:17:37.000000000 
+0100
@@ -5,7 +5,7 @@
 package Path::Tiny;
 # ABSTRACT: File path utility
 
-our $VERSION = '0.100';
+our $VERSION = '0.104';
 
 # Dependencies
 use Config;
@@ -356,6 +356,10 @@
 #pod
 #pod     my $lost = tempdir()->child("foo"); # tempdir cleaned up right away
 #pod
+#pod B<Note 4>: The cached object may be accessed with the L</cached_temp> 
method.
+#pod Keeping a reference to, or modifying the cached object may break the
+#pod behavior documented above and is not supported.  Use at your own risk.
+#pod
 #pod Current API available since 0.097.
 #pod
 #pod =cut
@@ -446,9 +450,9 @@
 #pod     $abs = path("foo/bar")->absolute("/tmp");
 #pod
 #pod Returns a new C<Path::Tiny> object with an absolute path (or itself if 
already
-#pod absolute).  Unless an argument is given, the current directory is used as 
the
-#pod absolute base path.  The argument must be absolute or you won't get an 
absolute
-#pod result.
+#pod absolute).  If no argument is given, the current directory is used as the
+#pod absolute base path.  If an argument is given, it will be converted to an
+#pod absolute path (if it is not already) and used as the absolute base path.
 #pod
 #pod This will not resolve upward directories ("foo/../bar") unless 
C<canonpath>
 #pod in L<File::Spec> would normally do so on your platform.  If you need them
@@ -457,7 +461,7 @@
 #pod On Windows, an absolute path without a volume component will have it added
 #pod based on the current drive.
 #pod
-#pod Current API available since 0.001.
+#pod Current API available since 0.101.
 #pod
 #pod =cut
 
@@ -480,9 +484,15 @@
         return $self if $self->is_absolute;
     }
 
-    # relative path on any OS
+    # no base means use current directory as base
     require Cwd;
-    return path( ( defined($base) ? $base : Cwd::getcwd() ), $_[0]->[PATH] );
+    return path( Cwd::getcwd(), $_[0]->[PATH] ) unless defined $base;
+
+    # relative base should be made absolute; we check is_absolute rather
+    # than unconditionally make base absolute so that "/foo" doesn't become
+    # "C:/foo" on Windows.
+    $base = path($base);
+    return path( ( $base->is_absolute ? $base : $base->absolute ), 
$_[0]->[PATH] );
 }
 
 #pod =method append, append_raw, append_utf8
@@ -625,6 +635,27 @@
 
 sub canonpath { $_[0]->[CANON] }
 
+#pod =method cached_temp
+#pod
+#pod Returns the cached C<File::Temp> or C<File::Temp::Dir> object if the
+#pod C<Path::Tiny> object was created with C</tempfile> or C</tempdir>.
+#pod If there is no such object, this method throws.
+#pod
+#pod B<WARNING>: Keeping a reference to, or modifying the cached object may
+#pod break the behavior documented for temporary files and directories created
+#pod with C<Path::Tiny> and is not supported.  Use at your own risk.
+#pod
+#pod Current API available since 0.101.
+#pod
+#pod =cut
+
+sub cached_temp {
+    my $self = shift;
+    $self->_throw( "cached_temp", $self, "has no cached File::Temp object" )
+      unless defined $self->[TEMP];
+    return $self->[TEMP];
+}
+
 #pod =method child
 #pod
 #pod     $file = path("/tmp")->child("foo.txt"); # "/tmp/foo.txt"
@@ -2107,7 +2138,7 @@
 
 =head1 VERSION
 
-version 0.100
+version 0.104
 
 =head1 SYNOPSIS
 
@@ -2305,6 +2336,10 @@
 
     my $lost = tempdir()->child("foo"); # tempdir cleaned up right away
 
+B<Note 4>: The cached object may be accessed with the L</cached_temp> method.
+Keeping a reference to, or modifying the cached object may break the
+behavior documented above and is not supported.  Use at your own risk.
+
 Current API available since 0.097.
 
 =head1 METHODS
@@ -2315,9 +2350,9 @@
     $abs = path("foo/bar")->absolute("/tmp");
 
 Returns a new C<Path::Tiny> object with an absolute path (or itself if already
-absolute).  Unless an argument is given, the current directory is used as the
-absolute base path.  The argument must be absolute or you won't get an absolute
-result.
+absolute).  If no argument is given, the current directory is used as the
+absolute base path.  If an argument is given, it will be converted to an
+absolute path (if it is not already) and used as the absolute base path.
 
 This will not resolve upward directories ("foo/../bar") unless C<canonpath>
 in L<File::Spec> would normally do so on your platform.  If you need them
@@ -2326,7 +2361,7 @@
 On Windows, an absolute path without a volume component will have it added
 based on the current drive.
 
-Current API available since 0.001.
+Current API available since 0.101.
 
 =head2 append, append_raw, append_utf8
 
@@ -2403,6 +2438,18 @@
 
 Current API available since 0.001.
 
+=head2 cached_temp
+
+Returns the cached C<File::Temp> or C<File::Temp::Dir> object if the
+C<Path::Tiny> object was created with C</tempfile> or C</tempdir>.
+If there is no such object, this method throws.
+
+B<WARNING>: Keeping a reference to, or modifying the cached object may
+break the behavior documented for temporary files and directories created
+with C<Path::Tiny> and is not supported.  Use at your own risk.
+
+Current API available since 0.101.
+
 =head2 child
 
     $file = path("/tmp")->child("foo.txt"); # "/tmp/foo.txt"
@@ -3222,7 +3269,7 @@
 
 =head1 CONTRIBUTORS
 
-=for stopwords Alex Efros Chris Williams David Steinbrunner Doug Bell Gabor 
Szabo Gabriel Andrade George Hartzell Geraud Continsouzas Goro Fuji Graham Knop 
Ollis James Hunt John Karr Karen Etheridge Mark Ellis Martin Kjeldsen Michael 
G. Schwern Nigel Gregoire Philippe Bruhat (BooK) Regina Verbae Roy Ivy III 
Shlomi Fish Smylers Tatsuhiko Miyagawa Toby Inkster Yanick Champoux 김도형 - Keedi 
Kim
+=for stopwords Alex Efros Chris Williams Dave Rolsky David Steinbrunner Doug 
Bell Gabor Szabo Gabriel Andrade George Hartzell Geraud Continsouzas Goro Fuji 
Graham Knop Ollis James Hunt John Karr Karen Etheridge Mark Ellis Martin 
Kjeldsen Michael G. Schwern Nigel Gregoire Philippe Bruhat (BooK) Regina Verbae 
Roy Ivy III Shlomi Fish Smylers Tatsuhiko Miyagawa Toby Inkster Yanick Champoux 
김도형 - Keedi Kim
 
 =over 4
 
@@ -3236,6 +3283,10 @@
 
 =item *
 
+Dave Rolsky <[email protected]>
+
+=item *
+
 David Steinbrunner <[email protected]>
 
 =item *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Path-Tiny-0.100/t/temp.t new/Path-Tiny-0.104/t/temp.t
--- old/Path-Tiny-0.100/t/temp.t        2017-01-15 04:48:32.000000000 +0100
+++ new/Path-Tiny-0.104/t/temp.t        2017-02-17 13:17:37.000000000 +0100
@@ -12,7 +12,8 @@
 
 subtest "tempdir" => sub {
     my $tempdir = Path::Tiny->tempdir;
-    my $string  = $tempdir->stringify;
+    isa_ok( $tempdir->cached_temp, 'File::Temp::Dir', "cached_temp" );
+    my $string = $tempdir->stringify;
     ok( $tempdir->exists, "tempdir exists" );
     undef $tempdir;
     ok( !-e $string, "tempdir destroyed" );
@@ -20,7 +21,8 @@
 
 subtest "tempfile" => sub {
     my $tempfile = Path::Tiny->tempfile;
-    my $string   = $tempfile->stringify;
+    isa_ok( $tempfile->cached_temp, 'File::Temp', "cached_temp" );
+    my $string = $tempfile->stringify;
     ok( $tempfile->exists, "tempfile exists" );
     undef $tempfile;
     ok( !-e $string, "tempfile destroyed" );
@@ -69,6 +71,12 @@
     is( $tempfile, $tempfile->realpath, "tempfile has realpath" );
 };
 
+subtest "cached_temp on non tempfile" => sub {
+    my $path = path("abcdefg");
+    eval { $path->cached_temp };
+    like( $@, qr/has no cached File::Temp object/, "cached_temp error message" 
);
+};
+
 done_testing;
 #
 # This file is part of Path-Tiny
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Path-Tiny-0.100/xt/author/pod-spell.t 
new/Path-Tiny-0.104/xt/author/pod-spell.t
--- old/Path-Tiny-0.100/xt/author/pod-spell.t   2017-01-15 04:48:32.000000000 
+0100
+++ new/Path-Tiny-0.104/xt/author/pod-spell.t   2017-02-17 13:17:37.000000000 
+0100
@@ -21,6 +21,7 @@
 Champoux
 Chris
 Continsouzas
+Dave
 David
 Doug
 Efros
@@ -59,6 +60,7 @@
 Path
 Philippe
 Regina
+Rolsky
 Roy
 SHA
 Schwern
@@ -73,6 +75,7 @@
 Verbae
 Williams
 Yanick
+autarch
 bingos
 book
 brainbuz


Reply via email to