get and put methods use OO-style scp to avoid clobbering errstr,
authorivan <ivan>
Mon, 18 Nov 2002 11:36:44 +0000 (11:36 +0000)
committerivan <ivan>
Mon, 18 Nov 2002 11:36:44 +0000 (11:36 +0000)
  thanks to paguerlais@airfrance.fr

Changes
SCP.pm

diff --git a/Changes b/Changes
index abbe017..aaf517e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 Revision history for Perl extension Net::SCP.
 
+0.07  unreleased
+       - get and put methods use OO-style scp to avoid clobbering errstr,
+         thanks to paguerlais@airfrance.fr
+
 0.06  Sat Apr 13 15:16:56 2002
        - mkdir method added by Anthony Awtrey <tony@awtrey.com>
 
diff --git a/SCP.pm b/SCP.pm
index 0e41e3d..5054d55 100644 (file)
--- a/SCP.pm
+++ b/SCP.pm
@@ -12,7 +12,7 @@ use IPC::Open3;
 
 @ISA = qw(Exporter);
 @EXPORT_OK = qw( scp iscp );
-$VERSION = '0.06';
+$VERSION = '0.07';
 
 $scp = "scp";
 
@@ -203,7 +203,7 @@ sub get {
   $local ||= basename($remote);
   my $source = $self->{'host'}. ":$remote";
   $source = $self->{'user'}. '@'. $source if $self->{'user'};
-  scp($source,$local);
+  $self->scp($source,$local);
 }
 
 =item mkdir DIRECTORY
@@ -289,7 +289,7 @@ sub put {
   my $dest = $self->{'host'}. ":$remote";
   $dest = $self->{'user'}. '@'. $dest if $self->{'user'};
   warn "scp $local $dest\n";
-  scp($local, $dest);
+  $self->scp($local, $dest);
 }
 
 =item binary