r76009 - in /branches/upstream/libfile-ncopy-perl/current: Changes Contributing.txt MANIFEST META.yml Makefile.PL lib/File/NCopy.pm t/ t/pod.t t/test.t test.pl
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sat Jun 18 20:22:09 UTC 2011
Author: gregoa
Date: Sat Jun 18 20:22:07 2011
New Revision: 76009
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=76009
Log:
[svn-upgrade] new version libfile-ncopy-perl (0.36)
Added:
branches/upstream/libfile-ncopy-perl/current/Contributing.txt
branches/upstream/libfile-ncopy-perl/current/META.yml
branches/upstream/libfile-ncopy-perl/current/t/
branches/upstream/libfile-ncopy-perl/current/t/pod.t
branches/upstream/libfile-ncopy-perl/current/t/test.t
Removed:
branches/upstream/libfile-ncopy-perl/current/test.pl
Modified:
branches/upstream/libfile-ncopy-perl/current/Changes
branches/upstream/libfile-ncopy-perl/current/MANIFEST
branches/upstream/libfile-ncopy-perl/current/Makefile.PL
branches/upstream/libfile-ncopy-perl/current/lib/File/NCopy.pm
Modified: branches/upstream/libfile-ncopy-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-ncopy-perl/current/Changes?rev=76009&op=diff
==============================================================================
--- branches/upstream/libfile-ncopy-perl/current/Changes (original)
+++ branches/upstream/libfile-ncopy-perl/current/Changes Sat Jun 18 20:22:07 2011
@@ -1,15 +1,30 @@
Revision history for Perl extension File::NCopy.
-0.34 Thur Apr 24 15:33:00 2003
- - MZSANFORD Added more File::Spec usage
- - MZSANFORD Added a note in BUGS from Ken Healy
- - MZSANFORD Fixed "preserve" option (thanks again Ken)
+0.36 Nov 26 2007 by Alexandr Ciornii
+ - perl 5.5 compatibility in tests
-0.33 Mon May 20 00:00:00 2002
- - MZSANFORD Added version that uses File::Spec to make portable.
- - MZSANFORD Added some basic tests
- - MZSANFORD Added additional debug statements
- - MZSANFORD tested code on Win32
+0.35 Apr 14 2007 by Alexandr Ciornii
+ - Marked distribution as deprecated
+ - Added Readme
+
+0.34_01 Apr 01 2007 by Alexandr Ciornii
+ - better distribution
+ - some small fixes
+ - Added file 'Contributing.txt'
+ - Request in Makefile.PL
+ - test moved to t/, use strict
+ - pod.t
+
+0.34 Thu Apr 24 15:33:00 2003 by MZSANFORD
+ - Added more File::Spec usage
+ - Added a note in BUGS from Ken Healy
+ - Fixed "preserve" option (thanks again Ken)
+
+0.33 Mon May 20 00:00:00 2002 by MZSANFORD
+ - Added version that uses File::Spec to make portable.
+ - Added some basic tests
+ - Added additional debug statements
+ - tested code on Win32
0.32 Thu Jun 25 17:45:04 1998
- Added force-write option. Fixed a bug which kept the module
Added: branches/upstream/libfile-ncopy-perl/current/Contributing.txt
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-ncopy-perl/current/Contributing.txt?rev=76009&op=file
==============================================================================
--- branches/upstream/libfile-ncopy-perl/current/Contributing.txt (added)
+++ branches/upstream/libfile-ncopy-perl/current/Contributing.txt Sat Jun 18 20:22:07 2011
@@ -1,0 +1,11 @@
+If you want better support for older Perls, use Test::Reporter.
+CPAN::Reporter is also required if you are using CPAN shell.
+Also you can run cpan smoking. That way module can be fixed even before
+you'll find that you need it. See CPAN::YACSmoke.
+
+
+Generally, you should use Test::Reporter - it's the only way to measure popularity
+of distribution. Why do anything with it, if it is not used.
+
+
+Patches welcome. Please write tests for error you found.
Modified: branches/upstream/libfile-ncopy-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-ncopy-perl/current/MANIFEST?rev=76009&op=diff
==============================================================================
--- branches/upstream/libfile-ncopy-perl/current/MANIFEST (original)
+++ branches/upstream/libfile-ncopy-perl/current/MANIFEST Sat Jun 18 20:22:07 2011
@@ -1,5 +1,8 @@
Changes
lib/File/NCopy.pm
-MANIFEST
Makefile.PL
-test.pl
+MANIFEST This list of files
+META.yml
+t/test.t
+t/pod.t
+Contributing.txt
Added: branches/upstream/libfile-ncopy-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-ncopy-perl/current/META.yml?rev=76009&op=file
==============================================================================
--- branches/upstream/libfile-ncopy-perl/current/META.yml (added)
+++ branches/upstream/libfile-ncopy-perl/current/META.yml Sat Jun 18 20:22:07 2011
@@ -1,0 +1,15 @@
+--- #YAML:1.0
+name: File-NCopy
+version: 0.36
+abstract: Deprecated module. Use File::Copy::Recursive instead. Copy file, file. Copy file[s] | dir[s], dir
+license: perl
+generated_by: ExtUtils::MakeMaker version 6.32
+distribution_type: module
+requires:
+ File::Spec: 0
+ Test::More: 0
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
+author:
+ - Alexandr Ciornii <alexchorny at gmail.com>
Modified: branches/upstream/libfile-ncopy-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-ncopy-perl/current/Makefile.PL?rev=76009&op=diff
==============================================================================
--- branches/upstream/libfile-ncopy-perl/current/Makefile.PL (original)
+++ branches/upstream/libfile-ncopy-perl/current/Makefile.PL Sat Jun 18 20:22:07 2011
@@ -1,8 +1,25 @@
+use 5.004;
use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
+
+print << 'EOT';
+
+*** WARNING ***
+Deprecated module. Use only if required by other module.
+You can use File::Copy::Recursive instead.
+
+*** REQUEST ***
+Please use Test::Reporter to report test results - it's the only way to measure
+popularity of distribution.
+
+EOT
+
WriteMakefile(
'NAME' => 'File::NCopy',
- 'VERSION_FROM' => './lib/File/NCopy.pm',
- 'PREREQ_PM' => { 'File::Spec' => 0 },
+ 'VERSION_FROM' => 'lib/File/NCopy.pm',
+ 'PREREQ_PM' => { 'File::Spec' => 0, 'Test::More'=>0},
+ ($ExtUtils::MakeMaker::VERSION gt '6.30'?
+ ('LICENSE' => 'perl', ) : ()),
+ ($] >= 5.005 ? ## Add these new keywords supported since 5.005
+ (ABSTRACT_FROM => './lib/File/NCopy.pm', # retrieve abstract from module
+ AUTHOR => 'Alexandr Ciornii <alexchorny@'.'gmail.com>') : ()),
);
Modified: branches/upstream/libfile-ncopy-perl/current/lib/File/NCopy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-ncopy-perl/current/lib/File/NCopy.pm?rev=76009&op=diff
==============================================================================
--- branches/upstream/libfile-ncopy-perl/current/lib/File/NCopy.pm (original)
+++ branches/upstream/libfile-ncopy-perl/current/lib/File/NCopy.pm Sat Jun 18 20:22:07 2011
@@ -1,10 +1,9 @@
package File::NCopy;
-require 5.004; # just because I think you should upgrade :)
+use 5.004; # just because I think you should upgrade :)
=head1 NAME
-B<File::NCopy> - Copy file, file
- Copy file[s] | dir[s], dir
+File::NCopy - Deprecated module. Use File::Copy::Recursive instead. Copy file, file. Copy file[s] | dir[s], dir
=head1 SYNOPSIS
@@ -165,7 +164,7 @@
=head1 AUTHOR
-Gabor Egressy B<gabor at vmunix.com>
+Gabor Egressy B<gabor AT vmunix.com>
Copyright (c) 1998 Gabor Egressy. All rights reserved. All wrongs
reversed. This program is free software; you can redistribute and/or
@@ -175,6 +174,8 @@
but the code was written from scratch.
Patch at versions 0.33, and 0.34 added by MZSANFORD.
+
+0.35, 0.36 - Alexandr Ciornii (alexchorny AT gmail.com)
=cut
@@ -186,7 +187,7 @@
# we export nothing by default :)
@EXPORT_OK = qw(copy cp);
-$VERSION = '0.34';
+$VERSION = '0.36';
# this works on Unix
sub u_chmod($$)
@@ -354,7 +355,7 @@
$dir = Cwd::cwd;
chdir $save_dir;
- $dir;
+ return $dir;
}
sub _recurse_from_dir($$$);
@@ -440,7 +441,7 @@
delete $this->{'_links'}->{$save_link};
}
- $retval;
+ return $retval;
}
sub _docopy_dir_dir($$$)
@@ -538,7 +539,7 @@
@args;
}
-sub new(@);
+sub new(@); #prototype
# this just redirects calls
sub copy(@)
@@ -561,7 +562,7 @@
my @copies;
my @args = expand @_;
- print "passed args ==> @args\n"
+ print "passed args ==> ".join(',',map {"'$_'"} @args)."\n"
if $this->{'_debug'};
# one or more files/directories to a directory
Added: branches/upstream/libfile-ncopy-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-ncopy-perl/current/t/pod.t?rev=76009&op=file
==============================================================================
--- branches/upstream/libfile-ncopy-perl/current/t/pod.t (added)
+++ branches/upstream/libfile-ncopy-perl/current/t/pod.t Sat Jun 18 20:22:07 2011
@@ -1,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();
Added: branches/upstream/libfile-ncopy-perl/current/t/test.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libfile-ncopy-perl/current/t/test.t?rev=76009&op=file
==============================================================================
--- branches/upstream/libfile-ncopy-perl/current/t/test.t (added)
+++ branches/upstream/libfile-ncopy-perl/current/t/test.t Sat Jun 18 20:22:07 2011
@@ -1,0 +1,61 @@
+
+use strict;
+use Test;
+use File::Spec;
+BEGIN { plan tests => 4 };
+use File::NCopy 0.35;
+ok(1); # Loaded
+
+# New object
+my $test = File::NCopy->new(test => 1);
+ok($test);
+
+# Need this later
+my $dirsep = File::Spec->catfile('a','b');
+$dirsep =~ s!a(.+)b$!$1!;
+my $rdirsep = ($dirsep eq '\\' ? '\\\\' : $dirsep );
+
+# Test Defaults
+ok($test->{recursive} == 0 && $test->{preserve} == 0 && $test->{follow_links} == 0 && $test->{force_write} == 0);
+
+my $tmp_dir = File::Spec->tmpdir();
+my $path = File::Spec->catfile($tmp_dir,'test_ncpy_inst');
+mkdir $path,0777 unless (-e $path); #perl 5.5 requires both arguments to mkdir
+$test->{recursive} = 1;
+my @files = $test->copy($tmp_dir,$path);
+if ((scalar(@files) == 0)) {
+ # Skip, no files to test with
+ skip(1,0);
+} else {
+ my $done = 0;
+ foreach my $path (@files) {
+ # Remove a leading one, if it has it
+ if (index($path,$dirsep) == 0) {
+ $path = substr($path,(length($path) - length($path) - 1),(length($path) - 1));
+ }
+ my @parts = split(/$rdirsep/,$path);
+ if (@parts > 0) {
+ # it should contain a seperator
+ $done = 1;
+ if (index($path,$dirsep)) {
+ # it has some in it.
+ ok(1);
+ $done = 1;
+ } else {
+ # this is bad.
+ warn "Path '$path' (".scalar(@parts)." parts) did not contain a separator\n";
+ ok(0);
+ $done = 1;
+ }
+ } else {
+ # no seperator, try next one;
+ next;
+ }
+ if ($done) {
+ last;
+ }
+ }
+ if (! $done) {
+ ok(0);
+ }
+}
More information about the Pkg-perl-cvs-commits
mailing list