diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/Changes libnet-sftp-foreign-perl-1.77+dfsg/Changes --- libnet-sftp-foreign-perl-1.75+dfsg/Changes 2013-04-02 15:04:40.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/Changes 2013-11-07 10:37:55.000000000 +0000 @@ -1,5 +1,30 @@ Revision history for Net::SFTP::Foreign +1.77 Nov 5, 2013 + - release as stable + - fix misspellings in error message + +1.76_04 Oct 2, 2013 + - fix 'Use of "goto" to jump into a construct is deprecated' + warning (bug report by Brent Bates) + - don't force permissions from rput when copy_perm is unset + +1.76_03 Aug 26, 2013 + - fix several spelling errors + - add spell checking test + - remove pod test from MANIFEST + - ensure that pty is not destroyed before main object (bug + report by Stephen Wylie) during global destruction + +1.76_02 Apr 29, 2013 + - remove warning happening when best_effort was set, specially + visible from Compat module (bug report by emerlyn at + PerlMonks) + +1.76_01 Apr 26, 2013 + - protect against callbacks setting $\ (bug report by Thomas + Wadley) + 1.75 Apr 2, 2013 - release as stable diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/MANIFEST libnet-sftp-foreign-perl-1.77+dfsg/MANIFEST --- libnet-sftp-foreign-perl-1.75+dfsg/MANIFEST 2013-04-03 09:03:24.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/MANIFEST 2013-12-11 21:17:16.000000000 +0000 @@ -21,7 +21,6 @@ samples/sftp_tail.pl samples/resume_put.pl t/1_run.t -t/2_pods.t t/3_convert.t t/4_perl5_11.t t/5_join.t @@ -30,4 +29,5 @@ t/data.txu t/Net-SFTP-Foreign-Compat.t TODO -META.yml Module meta-data (added by MakeMaker) +META.yml Module YAML meta-data (added by MakeMaker) +META.json Module JSON meta-data (added by MakeMaker) diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/META.json libnet-sftp-foreign-perl-1.77+dfsg/META.json --- libnet-sftp-foreign-perl-1.75+dfsg/META.json 1970-01-01 00:00:00.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/META.json 2013-11-07 10:41:02.000000000 +0000 @@ -0,0 +1,50 @@ +{ + "abstract" : "Secure File Transfer Protocol client", + "author" : [ + "Salvador Fandino " + ], + "dynamic_config" : 1, + "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150", + "license" : [ + "unknown" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Net-SFTP-Foreign", + "no_index" : { + "directory" : [ + "t", + "inc" + ] + }, + "prereqs" : { + "build" : { + "requires" : { + "ExtUtils::MakeMaker" : 0 + } + }, + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : 0 + } + }, + "runtime" : { + "requires" : { + "Scalar::Util" : 0, + "Test::More" : 0 + } + } + }, + "release_status" : "stable", + "resources" : { + "bugtracker" : { + "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Net-SFTP-Foreign" + }, + "repository" : { + "url" : "http://github.com/salva/p5-Net-SFTP-Foreign" + } + }, + "version" : "1.77" +} diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/META.yml libnet-sftp-foreign-perl-1.77+dfsg/META.yml --- libnet-sftp-foreign-perl-1.75+dfsg/META.yml 2013-04-02 15:06:49.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/META.yml 2013-11-07 10:41:02.000000000 +0000 @@ -1,26 +1,26 @@ ---- #YAML:1.0 -name: Net-SFTP-Foreign -version: 1.75 -abstract: Secure File Transfer Protocol client +--- +abstract: 'Secure File Transfer Protocol client' author: - - Salvador Fandino -license: unknown -distribution_type: module -configure_requires: - ExtUtils::MakeMaker: 0 + - 'Salvador Fandino ' build_requires: - ExtUtils::MakeMaker: 0 + ExtUtils::MakeMaker: 0 +configure_requires: + ExtUtils::MakeMaker: 0 +dynamic_config: 1 +generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150' +license: unknown +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: Net-SFTP-Foreign +no_index: + directory: + - t + - inc requires: - Scalar::Util: 0 - Test::More: 0 + Scalar::Util: 0 + Test::More: 0 resources: - bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Net-SFTP-Foreign - repository: http://github.com/salva/p5-Net-SFTP-Foreign -no_index: - directory: - - t - - inc -generated_by: ExtUtils::MakeMaker version 6.57_05 -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Net-SFTP-Foreign + repository: http://github.com/salva/p5-Net-SFTP-Foreign +version: 1.77 diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/TODO libnet-sftp-foreign-perl-1.77+dfsg/TODO --- libnet-sftp-foreign-perl-1.75+dfsg/TODO 2013-02-06 14:56:45.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/TODO 2013-11-07 07:38:00.000000000 +0000 @@ -15,6 +15,10 @@ - implement save_status methods as a wrapper like best_effort +- reimplement autodie in a saner way + +- allow per-method enabling/disabling autodie + DONE ==== diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/debian/changelog libnet-sftp-foreign-perl-1.77+dfsg/debian/changelog --- libnet-sftp-foreign-perl-1.75+dfsg/debian/changelog 2013-05-26 14:41:20.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/debian/changelog 2013-12-11 21:28:01.000000000 +0000 @@ -1,3 +1,13 @@ +libnet-sftp-foreign-perl (1.77+dfsg-1) unstable; urgency=medium + + * New upstream release. + * debian/watch: drop unused uversionmangle. + * Update years of packaging copyright. + * Add patch to fix POD errors. + * Declare compliance with Debian Policy 3.9.5. + + -- gregor herrmann Wed, 11 Dec 2013 22:27:54 +0100 + libnet-sftp-foreign-perl (1.75+dfsg-1) unstable; urgency=low [ Salvatore Bonaccorso ] diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/debian/control libnet-sftp-foreign-perl-1.77+dfsg/debian/control --- libnet-sftp-foreign-perl-1.75+dfsg/debian/control 2013-05-26 14:41:20.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/debian/control 2013-12-11 21:28:01.000000000 +0000 @@ -1,22 +1,26 @@ Source: libnet-sftp-foreign-perl +Maintainer: Debian Perl Group +Uploaders: Alejandro Garrido Mota , + gregor herrmann , + Antonio Radici , + Ryan Niebur , + Jonathan Yu , + Salvatore Bonaccorso , + Nicholas Bamber Section: perl Priority: optional Build-Depends: debhelper (>= 8) Build-Depends-Indep: perl -Maintainer: Debian Perl Group -Uploaders: Alejandro Garrido Mota , - gregor herrmann , Antonio Radici , - Ryan Niebur , Jonathan Yu , - Salvatore Bonaccorso , - Nicholas Bamber -Standards-Version: 3.9.4 -Homepage: https://metacpan.org/release/Net-SFTP-Foreign/ -Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libnet-sftp-foreign-perl.git +Standards-Version: 3.9.5 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libnet-sftp-foreign-perl.git +Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libnet-sftp-foreign-perl.git +Homepage: https://metacpan.org/release/Net-SFTP-Foreign/ Package: libnet-sftp-foreign-perl Architecture: all -Depends: ${misc:Depends}, ${perl:Depends}, openssh-client | ssh-client +Depends: ${misc:Depends}, + ${perl:Depends}, + openssh-client | ssh-client Recommends: libio-pty-perl Description: client for the Secure File Transfer Protocol Net::SFTP::Foreign is a Perl client for the Secure File Transfer Protocol, diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/debian/copyright libnet-sftp-foreign-perl-1.77+dfsg/debian/copyright --- libnet-sftp-foreign-perl-1.75+dfsg/debian/copyright 2013-05-26 14:41:20.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/debian/copyright 2013-12-11 21:28:01.000000000 +0000 @@ -13,7 +13,7 @@ License: Artistic or GPL-1+ Files: debian/* -Copyright: 2008-2011, gregor herrmann +Copyright: 2008-2013, gregor herrmann 2008, Roberto C. Sanchez 2009, 2010, Jonathan Yu 2009, Antonio Radici @@ -39,4 +39,3 @@ . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. - diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/debian/patches/pod.patch libnet-sftp-foreign-perl-1.77+dfsg/debian/patches/pod.patch --- libnet-sftp-foreign-perl-1.75+dfsg/debian/patches/pod.patch 1970-01-01 00:00:00.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/debian/patches/pod.patch 2013-12-11 21:28:01.000000000 +0000 @@ -0,0 +1,33 @@ +Description: fix POD ERRORS: + "Expected text after =item, not a number" + Newer Pod::* tools are more picky ... +Origin: vendor +Bug: https://rt.cpan.org/Ticket/Display.html?id=91330 +Forwarded: https://rt.cpan.org/Ticket/Display.html?id=91330 +Author: gregor herrmann +Last-Update: 2013-12-11 + +--- a/lib/Net/SFTP/Foreign.pm ++++ b/lib/Net/SFTP/Foreign.pm +@@ -3720,18 +3720,18 @@ + + =over 4 + +-=item 0 ++=item Z<>0 + + Never try to disconnect this object when exiting from any process. + + On most operating systems, the SSH process will exit when the last + process connected to it ends, but this is not guaranteed. + +-=item 1 ++=item Z<>1 + + Disconnect on exit from any process. This is the default. + +-=item 2 ++=item Z<>2 + + Disconnect on exit from the current process only. + diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/debian/patches/series libnet-sftp-foreign-perl-1.77+dfsg/debian/patches/series --- libnet-sftp-foreign-perl-1.75+dfsg/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/debian/patches/series 2013-12-11 21:28:01.000000000 +0000 @@ -0,0 +1 @@ +pod.patch diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/debian/watch libnet-sftp-foreign-perl-1.77+dfsg/debian/watch --- libnet-sftp-foreign-perl-1.75+dfsg/debian/watch 2013-05-26 14:41:20.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/debian/watch 2013-12-11 21:28:01.000000000 +0000 @@ -1,3 +1,3 @@ version=3 -opts="dversionmangle=s/\+dfsg$//,uversionmangle=s/_/./" \ +opts="dversionmangle=s/\+dfsg$//" \ https://metacpan.org/release/Net-SFTP-Foreign/ .*/Net-SFTP-Foreign-v?(\d[\d.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip) debian debian/repack.stub diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Attributes/Compat.pm libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Attributes/Compat.pm --- libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Attributes/Compat.pm 2012-09-26 10:45:50.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Attributes/Compat.pm 2013-11-07 07:38:00.000000000 +0000 @@ -34,7 +34,7 @@ =head1 NAME -Net::SFTP::Foreign::Attributes::Compat - adaptor for Net::SFTP::Attributes compatibility +Net::SFTP::Foreign::Attributes::Compat - adapter for Net::SFTP::Attributes compatibility =head1 SYNOPSIS diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Attributes.pm libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Attributes.pm --- libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Attributes.pm 2012-09-26 10:45:50.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Attributes.pm 2013-11-07 07:38:00.000000000 +0000 @@ -305,7 +305,7 @@ =item $attrs-Eset_perm($perm) -sets the value of the permsissions field or removes it if the value is +sets the value of the permissions field or removes it if the value is undefined. The flags field is also adjusted. =item $attr-Eset_ugid($uid, $gid) @@ -313,7 +313,7 @@ sets the values of the uid and gid fields, or removes them if they are undefined values. The flags field is adjusted. -This pair of fields can not be set separatelly because they share the +This pair of fields can not be set separately because they share the same bit on the flags field and so both have to be set or not. =item $attr-Eset_amtime($atime, $mtime) diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Backend/Unix.pm libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Backend/Unix.pm --- libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Backend/Unix.pm 2013-02-06 15:32:34.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Backend/Unix.pm 2013-11-07 07:39:17.000000000 +0000 @@ -1,6 +1,6 @@ package Net::SFTP::Foreign::Backend::Unix; -our $VERSION = '1.74_01'; +our $VERSION = '1.76_03'; use strict; use warnings; @@ -150,13 +150,13 @@ delete($opts->{asks_for_username_at_login}) ); if ($ask_for_username_at_login) { croak "ask_for_username_at_login set but user was not given" unless defined $user; - croak "ask_for_username_at_login set can not be user with a custom password prompt" + croak "ask_for_username_at_login can not be used with a custom password prompt" if defined $password_prompt; } } } - my $expect_log_user = delete $opts->{expect_log_user} || 0; + delete $opts->{expect_log_user}; # backward compatibility, not used anymore my $stderr_discard = delete $opts->{stderr_discard}; my $stderr_fh = ($stderr_discard ? undef : delete $opts->{stderr_fh}); my $open2_cmd = delete $opts->{open2_cmd}; @@ -271,7 +271,10 @@ return; } $sftp->{pid} = $child; - $sftp->{_pty} = $pty; + open my $pty_dup, '+>&', $pty; # store pty as a file handler instead of a object in + # order to save it from being destroyed too early + # during global destruction + $sftp->{_pty} = $pty_dup; $debug and $debug & 65536 and _debug "starting password authentication"; my $rv = ''; diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Common.pm libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Common.pm --- libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Common.pm 2013-02-06 16:56:19.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Common.pm 2013-11-07 07:38:00.000000000 +0000 @@ -1,6 +1,6 @@ package Net::SFTP::Foreign::Common; -our $VERSION = '1.68_01'; +our $VERSION = '1.76_02'; use strict; use warnings; @@ -74,7 +74,7 @@ # FIXME: use a better approach to determine when some error is fatal croak $error if $sftp->{_autodie}; } - else { + elsif ($sftp->{_error}) { # FIXME: use a better approach to determine when some error is fatal if ($sftp->{_error} != Net::SFTP::Foreign::Constants::SFTP_ERR_CONNECTION_BROKEN()) { $sftp->{_error} = 0; @@ -160,8 +160,7 @@ my $self = shift; my %opts = @_ & 1 ? ('dirs', @_) : @_; - $self->_set_error; - $self->_set_status; + $self->_clear_error_and_status; my $dirs = delete $opts{dirs}; my $follow_links = delete $opts{follow_links}; diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Compat.pm libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Compat.pm --- libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Compat.pm 2012-09-26 10:45:50.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Compat.pm 2013-11-07 07:38:00.000000000 +0000 @@ -43,11 +43,12 @@ new => [] ); BEGIN { - my @forbidden = qw( setcwd cwd open opendir sftpread sftpwrite seek - tell eof write flush read getc lstat stat fstat - remove rmdir mkdir setstat fsetstat close closedir - readdir realpath readlink rename symlink abort - get_content join glob rremove rget rput error ); + my @forbidden = qw( setcwd cwd open opendir sftpread sftpwrite + seek tell eof write flush read getc lstat stat + fstat remove rmdir mkdir setstat fsetstat + close closedir readdir realpath readlink + rename symlink abort get_content join glob + rremove rget rput error die_on_error ); for my $method (@forbidden) { my $super = "SUPER::$method"; @@ -231,7 +232,7 @@ =head1 NAME -Net::SFTP::Foreign::Compat - Adaptor for Net::SFTP compatibility +Net::SFTP::Foreign::Compat - Adapter for Net::SFTP compatibility =head1 SYNOPSIS @@ -261,7 +262,7 @@ The hash C<%Net::SFTP::Foreign::DEFAULTS> can be used to set default values for L methods called under the hood and -otherwise not accesible through the Net::SFTP API. +otherwise not accessible through the Net::SFTP API. The entries currently supported are: diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Local.pm libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Local.pm --- libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign/Local.pm 2012-09-26 10:45:50.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign/Local.pm 2013-11-07 07:38:00.000000000 +0000 @@ -112,7 +112,7 @@ =head1 NAME -Net::SFTP::Foreign::Local - access local fs with Net::SFTP::Foreign API. +Net::SFTP::Foreign::Local - access local file system through Net::SFTP::Foreign API. =head1 SYNOPSIS diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign.pm libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign.pm --- libnet-sftp-foreign-perl-1.75+dfsg/lib/Net/SFTP/Foreign.pm 2013-04-02 15:05:02.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/lib/Net/SFTP/Foreign.pm 2013-11-07 10:38:42.000000000 +0000 @@ -1,6 +1,6 @@ package Net::SFTP::Foreign; -our $VERSION = '1.75'; +our $VERSION = '1.77'; use strict; use warnings; @@ -315,6 +315,7 @@ $debug and $debug & 4 and _debug "process $pid reaped"; } } + close $sftp->{_pty} if defined $sftp->{_pty}; 1 } @@ -1686,7 +1687,7 @@ unless ($msg) { if ($sftp->{_status} == SSH2_FX_EOF) { - $sftp->_set_error(); + $sftp->_set_error; $roff != $loff and next; } last; @@ -1712,6 +1713,7 @@ if (length($data) and defined $cb) { # $size = $loff if ($loff > $size and $size != -1); + local $\; $cb->($sftp, $data, $lstart + $roff + $adjustment_before, $lstart + $size + $adjustment); @@ -1741,6 +1743,7 @@ if (length($data) and defined $cb) { # $size = $loff if ($loff > $size and $size != -1); + local $\; $cb->($sftp, $data, $askoff + $adjustment_before, $size + $adjustment); goto CLEANUP if $sftp->{_error}; } @@ -1757,7 +1760,10 @@ # we call the callback one last time with an empty string; if (defined $cb) { my $data = ''; - $cb->($sftp, $data, $askoff + $adjustment, $size + $adjustment); + do { + local $\; + $cb->($sftp, $data, $askoff + $adjustment, $size + $adjustment); + }; return undef if $sftp->{_error}; if (length($data) and !$dont_save) { unless (print $fh $data) { @@ -1831,12 +1837,11 @@ } $$atomic_numbered = $local if ref $atomic_numbered; } - - CLEANUP: - if ($cleanup and $sftp->{_error}) { - unlink $local; - unlink $atomic_local if $atomic_cleanup; - } + } + CLEANUP: + if ($cleanup and $sftp->{_error}) { + unlink $local; + unlink $atomic_local if $atomic_cleanup; } }; # autodie flag is restored here! @@ -2864,7 +2869,9 @@ } else { if ($sftp->put($fn, $rpath, - perm => ($copy_perm ? $e->{a}->perm : 0777) & $mask, + ($copy_perm + ? (perm => $e->{a}->perm & 0777 & $mask) + : (umask => $umask) ), copy_time => $copy_time, %put_opts)) { $count++; @@ -3385,7 +3392,7 @@ C, C, C. On the other hand, using the external command means an additional -proccess being launched and running, depending on your OS this could +process being launched and running, depending on your OS this could eat more resources than the in process pure perl implementation provided by L. @@ -3545,7 +3552,7 @@ possible that a username is also requested. When this flag is set to C<1>, the username will be send -inconditionally at the first remote prompt and then the password at +unconditionally at the first remote prompt and then the password at the second. When it is set to C the module will use some heuristics in order @@ -3677,7 +3684,7 @@ by default, and for performance reasons, write operations are cached, and only when the write buffer becomes big enough is the data written to -the remote file. Setting this flag makes the write operations inmediate. +the remote file. Setting this flag makes the write operations immediate. =item write_delay =E $bytes @@ -3730,7 +3737,7 @@ =back -See also the disconnect and autodisconnect methods. +See also the C and C methods. =item late_set_perm =E $bool @@ -3744,7 +3751,7 @@ =item backend => $backend From version 1.57 Net::SFTP::Foreign supports plugable backends in -order to allow other ways to comunicate with the remote server in +order to allow other ways to communicate with the remote server in addition to the default I. Custom backends may change the set of options supported by the C @@ -3826,18 +3833,18 @@ =item copy_perm =E $bool -determines if permision attributes have to be copied from remote +determines if permission attributes have to be copied from remote file. Default is to copy them after applying the local process umask. =item umask =E $umask allows one to select the umask to apply when setting the permissions of the copied file. Default is to use the umask for the current -process or C<0> if the C option is algo used. +process or C<0> if the C option is also used. =item perm =E $perm -sets the permision mask of the file to be $perm, remote +sets the permission mask of the file to be $perm, remote permissions are ignored. =item resume =E 1 | 'auto' @@ -3872,8 +3879,8 @@ $sftp->get("data.txt", "data.txt", numbered => 1); } -will copy the remote file as "data.txt" the first time and as -"data(1).txt" the second one. +will copy the remote file as C the first time and as +C the second one. If a scalar reference is passed as the numbered value, the final target will be stored in the value pointed by the reference. For @@ -3948,7 +3955,7 @@ =item block_size =E $bytes size of the blocks the file is being split on for transfer. -Incrementing this value can improve performance but some servers limit +Incrementing this value can improve performance but most servers limit the maximum size. =item queue_size =E $size @@ -3972,9 +3979,9 @@ =item $sftp-Eput($local, $remote, %opts) -Uploads a file C<$local> from the local host to the remote host, and -saves it as C<$remote>. By default file attributes are also -copied. For instance: +Uploads a file C<$local> from the local host to the remote host saving +it as C<$remote>. By default file attributes are also copied. For +instance: $sftp->put("test.txt", "test.txt") or die "put failed: " . $sftp->error; @@ -3982,9 +3989,9 @@ A file handle can also be passed in the C<$local> argument. In that case, data is read from there and stored in the remote file. UTF8 data is not supported unless a custom converter callback is used to -transform it to bytes and the method will croak if it encounters any -data in perl internal UTF8 format. Note also that the handle is not -closed when the transmission finish. +transform it to bytes. The method will croak if it encounters any data +in perl internal UTF8 format. Note also that the handle is not closed +when the transmission finish. Example: @@ -4003,7 +4010,7 @@ =item copy_perm =E $bool -determines if permision attributes have to be copied from remote +determines if permission attributes have to be copied from remote file. Default is to copy them after applying the local process umask. =item umask =E $umask @@ -4014,7 +4021,7 @@ =item perm =E $perm -sets the permision mask of the file to be $perm, umask and local +sets the permission mask of the file to be $perm, umask and local permissions are ignored. =item overwrite =E 0 @@ -4025,8 +4032,8 @@ =item numbered =E 1 -when required, adds a sequence number to local file names in order to -avoid overwriting pre-existent files. Off by default. +when set, a sequence number is added to the remote file name in order +to avoid overwriting pre-existent files. Off by default. =item append =E 1 @@ -4056,19 +4063,17 @@ conditions. OpenSSH server does it correctly on top of Linux/UNIX native file -systems (i.e. ext[234], ffs or zfs) but has problems on file systems +systems (i.e. ext[234]>, ffs or zfs) but has problems on file systems not supporting hard links (i.e. FAT) or on operating systems with broken POSIX semantics as Windows. =item cleanup =E 1 -If the transfer fails, attempts to remove the incomplete file. +If the transfer fails, attempts to remove the incomplete file. Cleanup +may fail (for example, if the SSH connection gets broken). -Cleanup may fail if for example the SSH connection gets broken. - -This option is set to by default when there is not possible to resume -the transfer afterwards (i.e., when using `atomic` or `numbered` -options). +This option is set by default when the transfer is not resumable +(i.e., when using `atomic` or `numbered` options). =item best_effort =E 1 @@ -4082,7 +4087,7 @@ =item callback =E $callback -C<$callback> is a reference to a subrutine that will be called after +C<$callback> is a reference to a subroutine that will be called after every iteration of the upload process. The callback function will receive as arguments: the current @@ -4167,8 +4172,8 @@ =item wanted =E qr/.../ -Only elements whose filename matchs the regular expression are included -on the listing. +Only elements whose name matches the given regular expression are +included on the listing. =item wanted =E sub {...} @@ -4191,7 +4196,7 @@ =item no_wanted =E sub {...} -those options have the oposite result to their C counterparts: +those options have the opposite result to their C counterparts: my $no_hidden = $sftp->ls( '/home/homer', no_wanted => qr/^\./ ) @@ -4210,8 +4215,8 @@ by default, the attributes on the listing correspond to a C operation, setting this option causes the method to perform C -requests instead. C attributes will stil appear for links -pointing to non existant places. +requests instead. C attributes will still appear for links +pointing to non existent places. =item atomic_readdir =E 1 @@ -4284,18 +4289,18 @@ By default symbolic links are not resolved and appear as that on the final listing. This option causes then to be resolved and substituted by the target file system object. Dangling links are ignored, though -they generate a call to the C callback when stat'ing them -fails. +they generate a call to the C callback when stat fails on +them. -Following sym links can introduce loops on the search. Infinite loops -are detected and broken but files can still appear repeated on the -final listing under different names unless the option C is -also actived. +Following symbolic links can introduce loops on the search. Infinite +loops are detected and broken but files can still appear repeated on +the final listing under different names unless the option C +is also active. =item ordered =E 1 By default, the file system is searched in an implementation dependent -order (actually optimized for low memory comsumption). If this option +order (actually optimized for low memory consumption). If this option is included, the file system is searched in a deep-first, sorted by filename fashion. @@ -4343,7 +4348,7 @@ C and C rules are unrelated. A directory discarded by a C rule will still be recursively searched unless it is also -discarded on a C rule and vice-versa. +discarded on a C rule and vice versa. =item atomic_readdir =E 1 @@ -4367,7 +4372,7 @@ This method tries to recover and continue under error conditions. -The given pattern can be a Unix style pattern (see L) or a +The given pattern can be a UNIX style pattern (see L) or a Regexp object (i.e C). In the later case, only files on the current working directory will be matched against the Regexp. @@ -4385,7 +4390,7 @@ =item strict_leading_dot =E 0 by default, a dot character at the beginning of a file or directory -name is not matched by willcards (C<*> or C). Setting this flags to +name is not matched by wildcards (C<*> or C). Setting this flags to a false value changes this behaviour. This flag is ignored when a Regexp object is used as the pattern. @@ -4423,7 +4428,7 @@ Recursively copies the contents of remote directory C<$remote> to local directory C<$local>. Returns the total number of elements -(files, dirs and symbolic links) successfully copied. +(files, directories and symbolic links) successfully copied. This method tries to recover and continue when some error happens. @@ -4612,7 +4617,8 @@ The method accepts all the options valid for L and for L (except those that do not make sense :-) -C<$localdir> is optional and defaults to the process cwd. +C<$localdir> is optional and defaults to the process current working +directory (C). Files are saved with the same name they have in the remote server excluding the directory parts. @@ -4635,7 +4641,7 @@ =item $sftp-Ejoin(@paths) returns the given path fragments joined in one path (currently the -remote file system is expected to be Unix like). +remote file system is expected to be UNIX like). =item $sftp-Eopen($path, $flags [, $attrs ]) @@ -4680,7 +4686,7 @@ As OpenSSH SFTP server implementation ignores this flag, the module emulates it (I will appreciate receiving feedback about the -interoperation of this module with other server implementations when +inter-operation of this module with other server implementations when this flag is used). =item SSH2_FXF_CREAT @@ -4710,7 +4716,7 @@ Closes the remote file handle C<$handle>. Files are automatically closed on the handle C method when -not done explicitelly. +not done explicitly. Returns true on success and undef on failure. @@ -4849,7 +4855,7 @@ =item $sftp-Eutime($path_or_fh, $atime, $mtime) -Shortcuts around setstat. +Shortcuts around C method. =item $sftp-Eremove($path) @@ -4870,7 +4876,7 @@ =item $sftp-Emkpath($path, $attrs) -This method is similar to C but also creates any non-existant +This method is similar to C but also creates any non-existent parent directories recursively. =item $sftp-Ermdir($path) @@ -4898,7 +4904,7 @@ =item overwrite => $bool By default, the rename operation fails when a file C<$new> already -exists. When this options is set, any previous existant file is +exists. When this options is set, any previous existent file is deleted first (the C operation will be used if available). @@ -4917,7 +4923,7 @@ =item $sftp-Ereadlink($path) Sends a C command to read the path where the -simbolic link is pointing. +symbolic link is pointing. Returns the target path on success and undef on failure. @@ -4998,15 +5004,15 @@ =item conversion =E 'dos2unix' Converts CR+LF line endings (as commonly used under MS-DOS) to LF -(Unix). +(UNIX). =item conversion =E 'unix2dos' -Converts LF line endings (Unix) to CR+LF (DOS). +Converts LF line endings (UNIX) to CR+LF (DOS). =item conversion =E sub { CONVERT $_[0] } -When a callback is given, it is invoked repeatly as chunks of data +When a callback is given, it is invoked repeatedly as chunks of data become available. It has to change C<$_[0]> in place in order to perform the conversion. @@ -5106,7 +5112,7 @@ B: Plink is a command line tool distributed with the L SSH client. Very popular between MS Windows users, it is also available for Linux and other -Unixes now. +UNIX now. =item Put method fails @@ -5132,10 +5138,10 @@ =item Put method fails even with late_set_perm set B: I added C 1> to the put call, but we are still -receiving the error "Couldn't setstat remote file (setstat)". +receiving the error C. B: Some servers forbid the SFTP C operation used by the -C method for replicating the file permissions and timestamps on +C method for replicating the file permissions and time-stamps on the remote side. As a work around you can just disable the feature: @@ -5219,7 +5225,7 @@ =item - Dirty cleanup: -On some operating systems, closing the pipes used to comunicate with +On some operating systems, closing the pipes used to communicate with the slave SSH process does not terminate it and a work around has to be applied. If you find that your scripts hung when the $sftp object gets out of scope, try setting C<$Net::SFTP::Foreign::dirty_cleanup> diff -Nru libnet-sftp-foreign-perl-1.75+dfsg/t/2_pods.t libnet-sftp-foreign-perl-1.77+dfsg/t/2_pods.t --- libnet-sftp-foreign-perl-1.75+dfsg/t/2_pods.t 2012-09-26 10:45:50.000000000 +0000 +++ libnet-sftp-foreign-perl-1.77+dfsg/t/2_pods.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!/usr/bin/perl - -use strict; -use Test::More; - -plan skip_all => "Only the author needs to check that POD docs are right" - unless eval "no warnings; getlogin eq 'salva'"; - -eval "use Test::Pod 1.00"; -plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; - -all_pod_files_ok( all_pod_files( qw(blib) ) );