r26494 - in /branches/upstream/libfile-spec-perl/current: ./ lib/File/ lib/File/Spec/ t/
ghostbar-guest at users.alioth.debian.org
ghostbar-guest at users.alioth.debian.org
Sun Nov 2 03:42:47 UTC 2008
Author: ghostbar-guest
Date: Sun Nov 2 03:42:44 2008
New Revision: 26494
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=26494
Log:
[svn-upgrade] Integrating new upstream version, libfile-spec-perl (3.29)
Added:
branches/upstream/libfile-spec-perl/current/README
Modified:
branches/upstream/libfile-spec-perl/current/Build.PL
branches/upstream/libfile-spec-perl/current/Changes
branches/upstream/libfile-spec-perl/current/Cwd.pm
branches/upstream/libfile-spec-perl/current/MANIFEST
branches/upstream/libfile-spec-perl/current/META.yml
branches/upstream/libfile-spec-perl/current/Makefile.PL
branches/upstream/libfile-spec-perl/current/SIGNATURE
branches/upstream/libfile-spec-perl/current/lib/File/Spec.pm
branches/upstream/libfile-spec-perl/current/lib/File/Spec/Cygwin.pm
branches/upstream/libfile-spec-perl/current/lib/File/Spec/Epoc.pm
branches/upstream/libfile-spec-perl/current/lib/File/Spec/Functions.pm
branches/upstream/libfile-spec-perl/current/lib/File/Spec/Mac.pm
branches/upstream/libfile-spec-perl/current/lib/File/Spec/OS2.pm
branches/upstream/libfile-spec-perl/current/lib/File/Spec/Unix.pm
branches/upstream/libfile-spec-perl/current/lib/File/Spec/VMS.pm
branches/upstream/libfile-spec-perl/current/lib/File/Spec/Win32.pm
branches/upstream/libfile-spec-perl/current/t/Spec.t
branches/upstream/libfile-spec-perl/current/t/win32.t
Modified: branches/upstream/libfile-spec-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/Build.PL?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/Build.PL (original)
+++ branches/upstream/libfile-spec-perl/current/Build.PL Sun Nov 2 03:42:44 2008
@@ -62,6 +62,7 @@
EOF
+
my $build = $class->new
(
dist_name => 'PathTools',
Modified: branches/upstream/libfile-spec-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/Changes?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/Changes (original)
+++ branches/upstream/libfile-spec-perl/current/Changes Sun Nov 2 03:42:44 2008
@@ -1,4 +1,35 @@
Revision history for Perl distribution PathTools.
+
+3.29 - Wed Oct 29 20:48:11 2008
+
+- Promote to stable release.
+
+3.28_03 - Mon Oct 27 22:12:11 2008
+
+- In Cwd.pm, pass the un-munged $VERSION to XSLoader/DynaLoader,
+ otherwise development releases fail tests on Win32.
+
+3.28_02 - Mon Oct 27 20:13:11 2008
+
+ - Fixed some issues on QNX/NTO related to paths with double
+ slashes. [Matt Kraai & Nicholas Clark]
+
+3.28_01 - Fri Jul 25 21:18:11 2008
+
+ - Fixed and clarified the behavior of splitpath() with a $no_file
+ argument on VMS. [Craig A. Berry, Peter Edwards]
+
+ - Removed some function prototypes and other Perl::Critic violations.
+
+ - canonpath() and catdir() and catfile() on Win32 now make an
+ explicit (and unnecessary) copy of their arguments right away,
+ because apparently if we don't, we sabotage all of Win32dom. [RT
+ #33675]
+
+ - The Makefile.PL now has 'use 5.005;' to explicitly show what
+ minimum version of perl we support. [Spotted by Alexandr Ciornii]
+
+3.2701 - Mon Feb 11 21:43:51 2008
- Fixed an edge case for Win32 catdir('C:', 'foo') and catfile('C:',
'foo.txt') (which the caller's not really supposed to do, that's
Modified: branches/upstream/libfile-spec-perl/current/Cwd.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/Cwd.pm?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/Cwd.pm (original)
+++ branches/upstream/libfile-spec-perl/current/Cwd.pm Sun Nov 2 03:42:44 2008
@@ -171,7 +171,9 @@
use Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
-$VERSION = '3.2701';
+$VERSION = '3.29';
+my $xs_version = $VERSION;
+$VERSION = eval $VERSION;
@ISA = qw/ Exporter /;
@EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
@@ -204,11 +206,11 @@
eval {
if ( $] >= 5.006 ) {
require XSLoader;
- XSLoader::load( __PACKAGE__, $VERSION );
+ XSLoader::load( __PACKAGE__, $xs_version);
} else {
require DynaLoader;
push @ISA, 'DynaLoader';
- __PACKAGE__->bootstrap( $VERSION );
+ __PACKAGE__->bootstrap( $xs_version );
}
};
Modified: branches/upstream/libfile-spec-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/MANIFEST?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/MANIFEST (original)
+++ branches/upstream/libfile-spec-perl/current/MANIFEST Sun Nov 2 03:42:44 2008
@@ -16,6 +16,7 @@
MANIFEST This list of files
META.yml
ppport.h
+README
t/crossplatform.t
t/cwd.t
t/Functions.t
Modified: branches/upstream/libfile-spec-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/META.yml?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/META.yml (original)
+++ branches/upstream/libfile-spec-perl/current/META.yml Sun Nov 2 03:42:44 2008
@@ -1,6 +1,6 @@
---
name: PathTools
-version: 3.2701
+version: 3.29
author:
- 'Maintained by Ken Williams <KWILLIAMS at cpan.org>'
abstract: Tools for working with paths and file specs across platforms
@@ -21,35 +21,35 @@
provides:
Cwd:
file: Cwd.pm
- version: 3.2701
+ version: 3.29
File::Spec:
file: lib/File/Spec.pm
- version: 3.2701
+ version: 3.29
File::Spec::Cygwin:
file: lib/File/Spec/Cygwin.pm
- version: 3.2701
+ version: 3.29
File::Spec::Epoc:
file: lib/File/Spec/Epoc.pm
- version: 3.2701
+ version: 3.29
File::Spec::Functions:
file: lib/File/Spec/Functions.pm
- version: 3.2701
+ version: 3.29
File::Spec::Mac:
file: lib/File/Spec/Mac.pm
- version: 3.2701
+ version: 3.29
File::Spec::OS2:
file: lib/File/Spec/OS2.pm
- version: 3.2701
+ version: 3.29
File::Spec::Unix:
file: lib/File/Spec/Unix.pm
- version: 3.2701
+ version: 3.29
File::Spec::VMS:
file: lib/File/Spec/VMS.pm
- version: 3.2701
+ version: 3.29
File::Spec::Win32:
file: lib/File/Spec/Win32.pm
- version: 3.2701
-generated_by: Module::Build version 0.2808
+ version: 3.29
+generated_by: Module::Build version 0.3
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
version: 1.2
Modified: branches/upstream/libfile-spec-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/Makefile.PL?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/Makefile.PL (original)
+++ branches/upstream/libfile-spec-perl/current/Makefile.PL Sun Nov 2 03:42:44 2008
@@ -1,7 +1,8 @@
BEGIN { @INC = grep {!/blib/} @INC }
-# Note: this file was auto-generated by Module::Build::Compat version 0.03
+# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01
+require 5.005;
use ExtUtils::MakeMaker;
WriteMakefile
(
@@ -21,6 +22,7 @@
'Test' => '0'
},
'INSTALLDIRS' => 'perl',
+ 'EXE_FILES' => [],
'PL_FILES' => {}
)
;
Added: branches/upstream/libfile-spec-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/README?rev=26494&op=file
==============================================================================
--- branches/upstream/libfile-spec-perl/current/README (added)
+++ branches/upstream/libfile-spec-perl/current/README Sun Nov 2 03:42:44 2008
@@ -1,0 +1,2 @@
+This is the combined distribution for the File::Spec and Cwd modules.
+Please see their respective documentation for details.
Modified: branches/upstream/libfile-spec-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/SIGNATURE?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/SIGNATURE (original)
+++ branches/upstream/libfile-spec-perl/current/SIGNATURE Sun Nov 2 03:42:44 2008
@@ -14,26 +14,27 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 1197012d986a400414e13e25d519db39d392c730 Build.PL
-SHA1 ed7091cda8d093ad745b3f8f730c7a2f0c370966 Changes
-SHA1 de7e341ebf8859efcf3f4397ebd187b02cae0779 Cwd.pm
+SHA1 4247c5f0eb1cc9fa86f32fb1fa61fcd93d0c72fd Build.PL
+SHA1 2d940fb246a1d0e92d09377e4f792482fc90db2b Changes
+SHA1 4800f35892450db49e60fbc93699fc9ac490de6c Cwd.pm
SHA1 9691a4713c8ad848302b29bec74ca1652ef55ab1 Cwd.xs
SHA1 ac6246562c365a8ad62f910ef31ce514d5a7e292 INSTALL
-SHA1 58c981892283d338e23971c5926089e0a6812caf MANIFEST
-SHA1 2a847578fe4d406d7630e78a96f5d7659f0e88c5 META.yml
-SHA1 3fb144a9fe45192b55f0b2950c7074241b4f4aa8 Makefile.PL
-SHA1 aa5ba0b36fdb7334a5277dab9c679c4b69346568 lib/File/Spec.pm
-SHA1 c472ae16f1c7ab39ff4f7851fe8053afde279a56 lib/File/Spec/Cygwin.pm
-SHA1 9aed1a2d107df5820a9e7d961d4a9c52aecb660b lib/File/Spec/Epoc.pm
-SHA1 70cb76f83eb7944ab6469c07dfc1f470359114bb lib/File/Spec/Functions.pm
-SHA1 f2f10c40181b2c9f810c2c0a0b01fbf2fc008d0d lib/File/Spec/Mac.pm
-SHA1 3f3232bf3d8505a8a4dcb73039d97a8d791d0501 lib/File/Spec/OS2.pm
-SHA1 eec230f65cef1a12dba368dde813423a5cd704fc lib/File/Spec/Unix.pm
-SHA1 0b8d9acfde082d25a35e9c12de6753a4721046d6 lib/File/Spec/VMS.pm
-SHA1 287669726408f71cadc4c9d107e19c0f79a71dc3 lib/File/Spec/Win32.pm
+SHA1 8ab46de1ff24eed1f57f28d04447dbf2607e2218 MANIFEST
+SHA1 2a51b60d378d589127157373bc8242f931f39a96 META.yml
+SHA1 426740fd23a65327b681e2b3b03246ea2bebddc7 Makefile.PL
+SHA1 68f627c2ae5dde5bb73508c4d61a08c82404664c README
+SHA1 4d508c69c40d0a260fe1a22cc69255817f02f674 lib/File/Spec.pm
+SHA1 e4c9f11e2d42497a090f0717c78f4450b90e2eb1 lib/File/Spec/Cygwin.pm
+SHA1 c53650dbcc2d2489aca9318ebea781d07a0c1adc lib/File/Spec/Epoc.pm
+SHA1 d32d405079e0bfa28b861842def1ba34986d8517 lib/File/Spec/Functions.pm
+SHA1 dda512aac7f93a34ce995ab36bf987d367d4f6fa lib/File/Spec/Mac.pm
+SHA1 b56c58e112a33f54170a6889433040b2536b70d4 lib/File/Spec/OS2.pm
+SHA1 c4f2bae026839cce76a55ac5c19fd9815ead0854 lib/File/Spec/Unix.pm
+SHA1 8c56428e02e746101ac911be7f34e5b77b7f42dc lib/File/Spec/VMS.pm
+SHA1 dbe5b987d7ee34c37ecfb26975df0552e2936529 lib/File/Spec/Win32.pm
SHA1 985bfff322df915f46b27f12e84b5674db9ad8a5 ppport.h
SHA1 77d045c1404fbe4c0910ed986b286f7b7b7d560d t/Functions.t
-SHA1 5d0d48593a68668273cb36f7aacb0e84facc24b7 t/Spec.t
+SHA1 0b0034cbc17608b24ba5ad3dd28274499a63a386 t/Spec.t
SHA1 88e00161e3c3108009dfba94ca64146badeceb7e t/crossplatform.t
SHA1 9862a3f294bb4a7d372cea0df551afa0f7a58177 t/cwd.t
SHA1 220a2b1de7f23aedf2f9daba53238c3d0b06db63 t/lib/Test/Builder.pm
@@ -43,11 +44,11 @@
SHA1 1eb98918332df0f2c7e76f8e17b74b03851cd8e6 t/rel2abs2rel.t
SHA1 3069528f07a6835dd076ec6831a2a6327b09483e t/taint.t
SHA1 7e845682c82fff7d3fc35240b3dcd30ecb3bbc01 t/tmpdir.t
-SHA1 9e5be2014f97483e76636bcbeb591392b0d68d16 t/win32.t
+SHA1 efc50b18fda48ab82d50b119eaef355b6be5f17f t/win32.t
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.5 (Darwin)
+Version: GnuPG v1.4.6 (GNU/Linux)
-iD8DBQFHsRXggrvMBLfvlHYRAnMBAJ9kfFAXhi5MFda9spM8GYAuPLnXNQCg4t5+
-H+umDGfx5/ePaDsIKwxZyQk=
-=3l7n
+iD8DBQFJCMCYZCuimE51gxcRAuXLAKCGgMM+y1+dwfYi128VKV6mI/+CZwCdG1AG
+i2rpKrNLxHE/lb7PUWHgFOE=
+=U1L/
-----END PGP SIGNATURE-----
Modified: branches/upstream/libfile-spec-perl/current/lib/File/Spec.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/lib/File/Spec.pm?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/lib/File/Spec.pm (original)
+++ branches/upstream/libfile-spec-perl/current/lib/File/Spec.pm Sun Nov 2 03:42:44 2008
@@ -3,7 +3,7 @@
use strict;
use vars qw(@ISA $VERSION);
-$VERSION = '3.2701';
+$VERSION = '3.29';
$VERSION = eval $VERSION;
my %module = (MacOS => 'Mac',
Modified: branches/upstream/libfile-spec-perl/current/lib/File/Spec/Cygwin.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/lib/File/Spec/Cygwin.pm?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/lib/File/Spec/Cygwin.pm (original)
+++ branches/upstream/libfile-spec-perl/current/lib/File/Spec/Cygwin.pm Sun Nov 2 03:42:44 2008
@@ -4,7 +4,8 @@
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '3.2701';
+$VERSION = '3.29';
+$VERSION = eval $VERSION;
@ISA = qw(File::Spec::Unix);
@@ -111,7 +112,7 @@
=cut
-sub case_tolerant () {
+sub case_tolerant {
return 1 unless $^O eq 'cygwin'
and defined &Cygwin::mount_flags;
Modified: branches/upstream/libfile-spec-perl/current/lib/File/Spec/Epoc.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/lib/File/Spec/Epoc.pm?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/lib/File/Spec/Epoc.pm (original)
+++ branches/upstream/libfile-spec-perl/current/lib/File/Spec/Epoc.pm Sun Nov 2 03:42:44 2008
@@ -3,7 +3,8 @@
use strict;
use vars qw($VERSION @ISA);
-$VERSION = '3.2701';
+$VERSION = '3.29';
+$VERSION = eval $VERSION;
require File::Spec::Unix;
@ISA = qw(File::Spec::Unix);
Modified: branches/upstream/libfile-spec-perl/current/lib/File/Spec/Functions.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/lib/File/Spec/Functions.pm?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/lib/File/Spec/Functions.pm (original)
+++ branches/upstream/libfile-spec-perl/current/lib/File/Spec/Functions.pm Sun Nov 2 03:42:44 2008
@@ -5,7 +5,8 @@
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
-$VERSION = '3.2701';
+$VERSION = '3.29';
+$VERSION = eval $VERSION;
require Exporter;
Modified: branches/upstream/libfile-spec-perl/current/lib/File/Spec/Mac.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/lib/File/Spec/Mac.pm?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/lib/File/Spec/Mac.pm (original)
+++ branches/upstream/libfile-spec-perl/current/lib/File/Spec/Mac.pm Sun Nov 2 03:42:44 2008
@@ -4,7 +4,8 @@
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '3.2701';
+$VERSION = '3.29';
+$VERSION = eval $VERSION;
@ISA = qw(File::Spec::Unix);
Modified: branches/upstream/libfile-spec-perl/current/lib/File/Spec/OS2.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/lib/File/Spec/OS2.pm?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/lib/File/Spec/OS2.pm (original)
+++ branches/upstream/libfile-spec-perl/current/lib/File/Spec/OS2.pm Sun Nov 2 03:42:44 2008
@@ -4,7 +4,8 @@
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '3.2701';
+$VERSION = '3.29';
+$VERSION = eval $VERSION;
@ISA = qw(File::Spec::Unix);
Modified: branches/upstream/libfile-spec-perl/current/lib/File/Spec/Unix.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/lib/File/Spec/Unix.pm?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/lib/File/Spec/Unix.pm (original)
+++ branches/upstream/libfile-spec-perl/current/lib/File/Spec/Unix.pm Sun Nov 2 03:42:44 2008
@@ -3,7 +3,8 @@
use strict;
use vars qw($VERSION);
-$VERSION = '3.2701';
+$VERSION = '3.29';
+$VERSION = eval $VERSION;
=head1 NAME
@@ -49,7 +50,10 @@
# more than two leading slashes shall be treated as a single slash.")
my $node = '';
my $double_slashes_special = $^O eq 'qnx' || $^O eq 'nto';
- if ( $double_slashes_special && $path =~ s{^(//[^/]+)(?:/|\z)}{/}s ) {
+
+
+ if ( $double_slashes_special
+ && ( $path =~ s{^(//[^/]+)/?\z}{}s || $path =~ s{^(//[^/]+)/}{/}s ) ) {
$node = $1;
}
# This used to be
@@ -104,7 +108,7 @@
=cut
-sub curdir () { '.' }
+sub curdir { '.' }
=item devnull
@@ -112,7 +116,7 @@
=cut
-sub devnull () { '/dev/null' }
+sub devnull { '/dev/null' }
=item rootdir
@@ -120,7 +124,7 @@
=cut
-sub rootdir () { '/' }
+sub rootdir { '/' }
=item tmpdir
@@ -169,7 +173,7 @@
=cut
-sub updir () { '..' }
+sub updir { '..' }
=item no_upwards
@@ -190,7 +194,7 @@
=cut
-sub case_tolerant () { 0 }
+sub case_tolerant { 0 }
=item file_name_is_absolute
Modified: branches/upstream/libfile-spec-perl/current/lib/File/Spec/VMS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/lib/File/Spec/VMS.pm?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/lib/File/Spec/VMS.pm (original)
+++ branches/upstream/libfile-spec-perl/current/lib/File/Spec/VMS.pm Sun Nov 2 03:42:44 2008
@@ -4,7 +4,8 @@
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '3.2701';
+$VERSION = '3.29';
+$VERSION = eval $VERSION;
@ISA = qw(File::Spec::Unix);
@@ -242,16 +243,34 @@
=item splitpath (override)
-Splits using VMS syntax.
+ ($volume,$directories,$file) = File::Spec->splitpath( $path );
+ ($volume,$directories,$file) = File::Spec->splitpath( $path, $no_file );
+
+Passing a true value for C<$no_file> indicates that the path being
+split only contains directory components, even on systems where you
+can usually (when not supporting a foreign syntax) tell the difference
+between directories and files at a glance.
=cut
sub splitpath {
- my($self,$path) = @_;
- my($dev,$dir,$file) = ('','','');
-
- vmsify($path) =~ /(.+:)?([\[<].*[\]>])?(.*)/s;
- return ($1 || '',$2 || '',$3);
+ my($self,$path, $nofile) = @_;
+ my($dev,$dir,$file) = ('','','');
+ my $vmsify_path = vmsify($path);
+ if ( $nofile ){
+ #vmsify('d1/d2/d3') returns '[.d1.d2]d3'
+ #vmsify('/d1/d2/d3') returns 'd1:[d2]d3'
+ if( $vmsify_path =~ /(.*)\](.+)/ ){
+ $vmsify_path = $1.'.'.$2.']';
+ }
+ $vmsify_path =~ /(.+:)?(.*)/s;
+ $dir = defined $2 ? $2 : ''; # dir can be '0'
+ return ($1 || '',$dir,$file);
+ }
+ else {
+ $vmsify_path =~ /(.+:)?([\[<].*[\]>])?(.*)/s;
+ return ($1 || '',$2 || '',$3);
+ }
}
=item splitdir (override)
@@ -470,7 +489,7 @@
sub fixpath {
my($self,$path,$force_path) = @_;
return '' unless $path;
- $self = bless {} unless ref $self;
+ $self = bless {}, $self unless ref $self;
my($fixedpath,$prefix,$name);
if ($path =~ /\s/) {
Modified: branches/upstream/libfile-spec-perl/current/lib/File/Spec/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/lib/File/Spec/Win32.pm?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/lib/File/Spec/Win32.pm (original)
+++ branches/upstream/libfile-spec-perl/current/lib/File/Spec/Win32.pm Sun Nov 2 03:42:44 2008
@@ -5,7 +5,8 @@
use vars qw(@ISA $VERSION);
require File::Spec::Unix;
-$VERSION = '3.2701';
+$VERSION = '3.29';
+$VERSION = eval $VERSION;
@ISA = qw(File::Spec::Unix);
@@ -41,7 +42,7 @@
return "nul";
}
-sub rootdir () { '\\' }
+sub rootdir { '\\' }
=item tmpdir
@@ -87,7 +88,7 @@
=cut
-sub case_tolerant () {
+sub case_tolerant {
eval { require Win32API::File; } or return 1;
my $drive = shift || "C:";
my $osFsType = "\0"x256;
@@ -375,9 +376,10 @@
=cut
-sub _canon_cat(@) # @path -> path
+sub _canon_cat # @path -> path
{
- my $first = shift;
+ my ($first, @rest) = @_;
+
my $volume = $first =~ s{ \A ([A-Za-z]:) ([\\/]?) }{}x # drive letter
? ucfirst( $1 ).( $2 ? "\\" : "" )
: $first =~ s{ \A (?:\\\\|//) ([^\\/]+)
@@ -387,7 +389,7 @@
: $first =~ s{ \A [\\/] }{}x # root dir
? "\\"
: "";
- my $path = join "\\", $first, @_;
+ my $path = join "\\", $first, @rest;
$path =~ tr#\\/#\\\\#s; # xx/yy --> xx\yy & xx\\yy --> xx\yy
Modified: branches/upstream/libfile-spec-perl/current/t/Spec.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/t/Spec.t?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/t/Spec.t (original)
+++ branches/upstream/libfile-spec-perl/current/t/Spec.t Sun Nov 2 03:42:44 2008
@@ -311,6 +311,44 @@
[ "VMS->splitpath('node::volume:[d1.d2.d3]file')", 'node::volume:,[d1.d2.d3],file' ],
[ "VMS->splitpath('node\"access_spec\"::volume:[d1.d2.d3]')", 'node"access_spec"::volume:,[d1.d2.d3],' ],
[ "VMS->splitpath('node\"access_spec\"::volume:[d1.d2.d3]file')", 'node"access_spec"::volume:,[d1.d2.d3],file' ],
+
+[ "VMS->splitpath('[]')", ',[],' ],
+[ "VMS->splitpath('[-]')", ',[-],' ],
+[ "VMS->splitpath('[]file')", ',[],file' ],
+[ "VMS->splitpath('[-]file')", ',[-],file' ],
+[ "VMS->splitpath('')", ',,' ],
+[ "VMS->splitpath('0')", ',,0' ],
+[ "VMS->splitpath('[0]')", ',[0],' ],
+[ "VMS->splitpath('[.0]')", ',[.0],' ],
+[ "VMS->splitpath('[0.0.0]')", ',[0.0.0],' ],
+[ "VMS->splitpath('[.0.0.0]')", ',[.0.0.0],' ],
+[ "VMS->splitpath('[0]0')", ',[0],0' ],
+[ "VMS->splitpath('[0.0.0]0')", ',[0.0.0],0' ],
+[ "VMS->splitpath('[.0.0.0]0')", ',[.0.0.0],0' ],
+[ "VMS->splitpath('0/0')", ',[.0],0' ],
+[ "VMS->splitpath('0/0/0')", ',[.0.0],0' ],
+[ "VMS->splitpath('/0/0')", '0:,[000000],0' ],
+[ "VMS->splitpath('/0/0/0')", '0:,[0],0' ],
+[ "VMS->splitpath('d1',1)", ',d1,' ],
+# $no_file tests
+[ "VMS->splitpath('[d1.d2.d3]',1)", ',[d1.d2.d3],' ],
+[ "VMS->splitpath('[.d1.d2.d3]',1)", ',[.d1.d2.d3],' ],
+[ "VMS->splitpath('d1/d2/d3',1)", ',[.d1.d2.d3],' ],
+[ "VMS->splitpath('/d1/d2/d3',1)", 'd1:,[d2.d3],' ],
+[ "VMS->splitpath('node::volume:[d1.d2.d3]',1)", 'node::volume:,[d1.d2.d3],' ],
+[ "VMS->splitpath('node\"access_spec\"::volume:[d1.d2.d3]',1)", 'node"access_spec"::volume:,[d1.d2.d3],' ],
+[ "VMS->splitpath('[]',1)", ',[],' ],
+[ "VMS->splitpath('[-]',1)", ',[-],' ],
+[ "VMS->splitpath('',1)", ',,' ],
+[ "VMS->splitpath('0',1)", ',0,' ],
+[ "VMS->splitpath('[0]',1)", ',[0],' ],
+[ "VMS->splitpath('[.0]',1)", ',[.0],' ],
+[ "VMS->splitpath('[0.0.0]',1)", ',[0.0.0],' ],
+[ "VMS->splitpath('[.0.0.0]',1)", ',[.0.0.0],' ],
+[ "VMS->splitpath('0/0',1)", ',[.0.0],' ],
+[ "VMS->splitpath('0/0/0',1)", ',[.0.0.0],' ],
+[ "VMS->splitpath('/0/0',1)", '0:,[000000.0],' ],
+[ "VMS->splitpath('/0/0/0',1)", '0:,[0.0],' ],
[ "VMS->catpath('','','file')", 'file' ],
[ "VMS->catpath('','[d1.d2.d3]','')", '[d1.d2.d3]' ],
Modified: branches/upstream/libfile-spec-perl/current/t/win32.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-spec-perl/current/t/win32.t?rev=26494&op=diff
==============================================================================
--- branches/upstream/libfile-spec-perl/current/t/win32.t (original)
+++ branches/upstream/libfile-spec-perl/current/t/win32.t Sun Nov 2 03:42:44 2008
@@ -11,7 +11,7 @@
use Test::More;
if( $^O eq 'MSWin32' ) {
- plan tests => 3;
+ plan tests => 4;
} else {
plan skip_all => 'this is not win32';
}
@@ -29,3 +29,10 @@
# May not have a D: drive mounted
ok 1;
}
+
+# Ensure compatibility with naughty versions of Template::Toolkit,
+# which pass in a bare $1 as an argument
+'Foo/strawberry' =~ /(.*)/;
+my $result = File::Spec::Win32->catfile('C:/cache', $1);
+is( $result, 'C:\cache\Foo\strawberry' );
+
More information about the Pkg-perl-cvs-commits
mailing list