r2853 - in /packages/libfile-path-expand-perl/branches/upstream/current: Changes META.yml Makefile.PL lib/File/Path/Expand.pm t/File-Path-Expand.t

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Fri Jun 2 11:17:26 UTC 2006


Author: eloy
Date: Fri Jun  2 11:17:26 2006
New Revision: 2853

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=2853
Log:
Load /tmp/tmp.pyMkU24394/libfile-path-expand-perl-1.02 into
packages/libfile-path-expand-perl/branches/upstream/current.

Modified:
    packages/libfile-path-expand-perl/branches/upstream/current/Changes
    packages/libfile-path-expand-perl/branches/upstream/current/META.yml
    packages/libfile-path-expand-perl/branches/upstream/current/Makefile.PL
    packages/libfile-path-expand-perl/branches/upstream/current/lib/File/Path/Expand.pm
    packages/libfile-path-expand-perl/branches/upstream/current/t/File-Path-Expand.t

Modified: packages/libfile-path-expand-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libfile-path-expand-perl/branches/upstream/current/Changes?rev=2853&op=diff
==============================================================================
--- packages/libfile-path-expand-perl/branches/upstream/current/Changes (original)
+++ packages/libfile-path-expand-perl/branches/upstream/current/Changes Fri Jun  2 11:17:26 2006
@@ -1,3 +1,6 @@
+1.02 Thursday 11th May, 2006
+	Apply the patch from http://rt.cpan.org/Ticket/Display.html?id=13081
+
 1.01 Sunday 11th May, 2003
 	Bugfix to the test suite - had miscounted the number of skipped tests
 

Modified: packages/libfile-path-expand-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libfile-path-expand-perl/branches/upstream/current/META.yml?rev=2853&op=diff
==============================================================================
--- packages/libfile-path-expand-perl/branches/upstream/current/META.yml (original)
+++ packages/libfile-path-expand-perl/branches/upstream/current/META.yml Fri Jun  2 11:17:26 2006
@@ -1,15 +1,14 @@
---- #YAML:1.0
+---
 name: File-Path-Expand
-version: 1.01
+version: 1.02
+author:
+  - Richard Clamp <richardc at unixbeard.net>
+abstract: expand filenames
 license: perl
-distribution_type: module
 requires:
   Test::More: 0
-recommends: {}
-build_requires: {}
-conflicts: {}
 provides:
   File::Path::Expand:
     file: lib/File/Path/Expand.pm
-    version: 1.01
-generated_by: Module::Build version 0.18
+    version: 1.02
+generated_by: Module::Build version 0.261

Modified: packages/libfile-path-expand-perl/branches/upstream/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libfile-path-expand-perl/branches/upstream/current/Makefile.PL?rev=2853&op=diff
==============================================================================
--- packages/libfile-path-expand-perl/branches/upstream/current/Makefile.PL (original)
+++ packages/libfile-path-expand-perl/branches/upstream/current/Makefile.PL Fri Jun  2 11:17:26 2006
@@ -1,10 +1,13 @@
-    use ExtUtils::MakeMaker;
-    WriteMakefile
-      ('DISTNAME' => 'File-Path-Expand',
-       'VERSION' => '1.01',
-       'PL_FILES' => {},
-       'PREREQ_PM' => {
-			'Test::More' => '0',
-
-		      },
-      );
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
+use ExtUtils::MakeMaker;
+WriteMakefile
+(
+          'PL_FILES' => {},
+          'INSTALLDIRS' => 'site',
+          'NAME' => 'File::Path::Expand',
+          'VERSION_FROM' => 'lib/File/Path/Expand.pm',
+          'PREREQ_PM' => {
+                           'Test::More' => 0
+                         }
+        )
+;

Modified: packages/libfile-path-expand-perl/branches/upstream/current/lib/File/Path/Expand.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libfile-path-expand-perl/branches/upstream/current/lib/File/Path/Expand.pm?rev=2853&op=diff
==============================================================================
--- packages/libfile-path-expand-perl/branches/upstream/current/lib/File/Path/Expand.pm (original)
+++ packages/libfile-path-expand-perl/branches/upstream/current/lib/File/Path/Expand.pm Fri Jun  2 11:17:26 2006
@@ -6,14 +6,14 @@
 use base 'Exporter';
 use vars qw( $VERSION @EXPORT @EXPORT_OK );
 
-$VERSION   = '1.01';
+$VERSION   = '1.02';
 @EXPORT    = qw( expand_filename );
 @EXPORT_OK = qw( expand_filename  home_of );
 
 sub expand_filename {
     my $path = shift;
-    $path =~ s{^~/}{ $ENV{HOME} ? "$ENV{HOME}/" : home_of( $> )."/" }e;
-    $path =~ s{^~(.*?)/}{ home_of( $1 )."/" }e;
+    $path =~ s{^~(?=/|$)}{ $ENV{HOME} ? "$ENV{HOME}" : home_of( $> ) }e
+      or $path =~ s{^~(.+?)(?=/|$)}{ home_of( $1 ) }e;
     return $path;
 }
 

Modified: packages/libfile-path-expand-perl/branches/upstream/current/t/File-Path-Expand.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libfile-path-expand-perl/branches/upstream/current/t/File-Path-Expand.t?rev=2853&op=diff
==============================================================================
--- packages/libfile-path-expand-perl/branches/upstream/current/t/File-Path-Expand.t (original)
+++ packages/libfile-path-expand-perl/branches/upstream/current/t/File-Path-Expand.t Fri Jun  2 11:17:26 2006
@@ -1,26 +1,30 @@
 #!perl -w
 use strict;
-use Test::More tests => 5;
+use Test::More tests => 8;
 use Sys::Hostname;
 BEGIN { use_ok('File::Path::Expand') };
 
 $ENV{HOME} = '/some/path';
 is( expand_filename('~/foo'), "/some/path/foo", 'uses $HOME' );
+is( expand_filename('~'), $ENV{HOME}, '...and similarly for ~' );
 
 SKIP: {
-    skip "only guaranteed on penfold", 3
+    skip "only guaranteed on penfold", 5
       unless hostname eq 'penfold.unixbeard.net';
 
   SKIP: {
-        skip "have to be richardc too", 1
+        skip "have to be richardc too", 2
           unless $> eq 1000;
 
         $ENV{HOME} = '';
         is( expand_filename("~/foo"), "/home/richardc/foo",
             'without $HOME ~/' );
+        is( expand_filename("~"), "/home/richardc",
+            '...and similarly for ~' );
     }
 
     is( expand_filename('~root/foo'), "/root/foo", 'root' );
+    is( expand_filename('~root'), "/root", '...and similarly for ~root' );
 
     eval { expand_filename('~frooby/') };
     like( $@, qr{^no such user 'frooby'}, "failure" );




More information about the Pkg-perl-cvs-commits mailing list