r18848 - in /branches/upstream/libnet-sftp-foreign-perl/current: Changes META.yml lib/Net/SFTP/Foreign.pm lib/Net/SFTP/Foreign/Compat.pm
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sat Apr 19 19:38:42 UTC 2008
Author: gregoa
Date: Sat Apr 19 19:38:41 2008
New Revision: 18848
URL: http://svn.debian.org/wsvn/?sc=1&rev=18848
Log:
[svn-upgrade] Integrating new upstream version, libnet-sftp-foreign-perl (1.36+dfsg)
Modified:
branches/upstream/libnet-sftp-foreign-perl/current/Changes
branches/upstream/libnet-sftp-foreign-perl/current/META.yml
branches/upstream/libnet-sftp-foreign-perl/current/lib/Net/SFTP/Foreign.pm
branches/upstream/libnet-sftp-foreign-perl/current/lib/Net/SFTP/Foreign/Compat.pm
Modified: branches/upstream/libnet-sftp-foreign-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-sftp-foreign-perl/current/Changes?rev=18848&op=diff
==============================================================================
--- branches/upstream/libnet-sftp-foreign-perl/current/Changes (original)
+++ branches/upstream/libnet-sftp-foreign-perl/current/Changes Sat Apr 19 19:38:41 2008
@@ -1,11 +1,17 @@
Revision history for Net::SFTP::Foreign
-1.35 8 Feb, 2008
+1.36 Apr 18, 2008
+ - forbid usage of Net::SFTP::Foreign methods from Compat
+ module (bug reported by Fred Zellinger)
+ - document the password and passphrase constructor
+ options.
+
+1.35 Feb 8, 2008
- put method was failing for binary files under Windows
because binmode was not set on the local filehandler (bug
report and patch by Patrick Frazer).
-1.34 8 Jan, 2008
+1.34 Jan 8, 2008
- document rput. It said it was not implemented (bug report
by Paul Kolano).
Modified: branches/upstream/libnet-sftp-foreign-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-sftp-foreign-perl/current/META.yml?rev=18848&op=diff
==============================================================================
--- branches/upstream/libnet-sftp-foreign-perl/current/META.yml (original)
+++ branches/upstream/libnet-sftp-foreign-perl/current/META.yml Sat Apr 19 19:38:41 2008
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Net-SFTP-Foreign
-version: 1.35
+version: 1.36
abstract: Secure File Transfer Protocol client
license: ~
generated_by: ExtUtils::MakeMaker version 6.32
Modified: branches/upstream/libnet-sftp-foreign-perl/current/lib/Net/SFTP/Foreign.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-sftp-foreign-perl/current/lib/Net/SFTP/Foreign.pm?rev=18848&op=diff
==============================================================================
--- branches/upstream/libnet-sftp-foreign-perl/current/lib/Net/SFTP/Foreign.pm (original)
+++ branches/upstream/libnet-sftp-foreign-perl/current/lib/Net/SFTP/Foreign.pm Sat Apr 19 19:38:41 2008
@@ -1,6 +1,6 @@
package Net::SFTP::Foreign;
-our $VERSION = '1.35';
+our $VERSION = '1.36';
use strict;
use warnings;
@@ -2558,10 +2558,6 @@
Net::SFTP::Foreign supports version 2 of the SSH protocol only.
-Finally B<Net::SFTP::Foreign does not (and will never) allow to use
-passwords for authentication> while Net::SFTP does... though, see the
-FAQ below.
-
=head2 USAGE
@@ -2650,6 +2646,13 @@
not cause the process at the other side to exit. The additional
C<$pid> argument can be used to instruct this module to kill that
process if it doesn't exit by itself.
+
+=item password => $password
+
+=item passphrase => $passphrase
+
+Use L<Expect> to handle password authentication or keys requiring a
+passphrase. This is an experimental feature!
=back
@@ -3497,7 +3500,7 @@
mention of using a password to login. How is one, able to login to a
SFTP server that requires uid/passwd for login?
-B<A>: You can't!... well, actually, you can!
+B<A>: You can't!... well, actually, now, you can!
Use the C<password> option when calling the constructor:
@@ -3578,7 +3581,9 @@
Support for taint mode is experimental!
-Support for setcwd/cwd is also experimental!
+Support for setcwd/cwd is experimental!
+
+Support for password/passphrase handling via Expect is also experimental!
To report bugs, please, send me and email or use
L<http://rt.cpan.org>.
Modified: branches/upstream/libnet-sftp-foreign-perl/current/lib/Net/SFTP/Foreign/Compat.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libnet-sftp-foreign-perl/current/lib/Net/SFTP/Foreign/Compat.pm?rev=18848&op=diff
==============================================================================
--- branches/upstream/libnet-sftp-foreign-perl/current/lib/Net/SFTP/Foreign/Compat.pm (original)
+++ branches/upstream/libnet-sftp-foreign-perl/current/lib/Net/SFTP/Foreign/Compat.pm Sat Apr 19 19:38:41 2008
@@ -1,6 +1,6 @@
package Net::SFTP::Foreign::Compat;
-our $VERSION = '0.90_17';
+our $VERSION = '1.36';
use warnings;
use strict;
@@ -37,6 +37,26 @@
}
}
+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 );
+
+ for my $method (@forbidden) {
+ my $super = "SUPER::$method";
+ no strict 'refs';
+ *{$method} = sub {
+ unless (index((caller)[0], "Net::SFTP::Foreign") == 0) {
+ croak "Method '$method' is not available from " . __PACKAGE__
+ . ", use the real Net::SFTP::Foreign if you want it!";
+ }
+ shift->$super(@_);
+ };
+ }
+}
+
sub new {
my ($class, $host, %opts) = @_;
@@ -45,7 +65,7 @@
$warn = delete($opts{warn}) || sub {};
}
else {
- $warn = sub { warn(join '', @_, "\n") };
+ $warn = sub { warn(CORE::join '', @_, "\n") };
}
my $sftp = $class->SUPER::new($host, %opts);
@@ -65,7 +85,7 @@
sub _warn_error {
my $sftp = shift;
- if (my $e = $sftp->error) {
+ if (my $e = $sftp->SUPER::error) {
$sftp->_warn($e);
}
}
@@ -91,7 +111,7 @@
or return undef;
if ($save) {
- return join('', @content);
+ return CORE::join('', @content);
}
}
@@ -101,7 +121,7 @@
$sftp->SUPER::put($local, $remote,
(defined $cb ? (callback => $cb) : ()));
$sftp->_warn_error;
- !$sftp->error;
+ !$sftp->SUPER::error;
}
sub ls {
@@ -122,15 +142,15 @@
}
}
-sub do_open { shift->open(@_) }
-
-sub do_opendir { shift->opendir(@_) }
-
-sub do_realpath { shift->realpath(@_) }
+sub do_open { shift->SUPER::open(@_) }
+
+sub do_opendir { shift->SUPER::opendir(@_) }
+
+sub do_realpath { shift->SUPER::realpath(@_) }
sub do_read {
my $sftp = shift;
- my $read = $sftp->sftpread(@_);
+ my $read = $sftp->SUPER::sftpread(@_);
$sftp->_warn_error;
if (wantarray) {
return ($read, $sftp->status);
@@ -141,7 +161,7 @@
}
sub _gen_do_and_status {
- my $method = shift;
+ my $method = "SUPER::" . shift;
return sub {
my $sftp = shift;
$sftp->$method(@_);
@@ -170,7 +190,7 @@
}
sub _gen_do_stat {
- my $method = shift;
+ my $method = "SUPER::" . shift;
return sub {
my $sftp = shift;
if (my $a = $sftp->$method(@_)) {
@@ -222,7 +242,7 @@
=head1 COPYRIGHT
-Copyright (c) 2006 Salvador FandiE<ntilde>o
+Copyright (c) 2006-2008 Salvador FandiE<ntilde>o
All rights reserved. This program is free software; you can
redistribute it and/or modify it under the same terms as Perl itself.
More information about the Pkg-perl-cvs-commits
mailing list