0.07
[Net-SCP.git] / SCP.pm
diff --git a/SCP.pm b/SCP.pm
index 5054d55..6347cae 100644 (file)
--- a/SCP.pm
+++ b/SCP.pm
@@ -1,7 +1,7 @@
 package Net::SCP;
 
 use strict;
-use vars qw($VERSION @ISA @EXPORT_OK $scp);
+use vars qw($VERSION @ISA @EXPORT_OK $scp $DEBUG);
 use Exporter;
 use Carp;
 use File::Basename;
@@ -16,6 +16,8 @@ $VERSION = '0.07';
 
 $scp = "scp";
 
+$DEBUG = 0;
+
 =head1 NAME
 
 Net::SCP - Perl extension for secure copy protocol
@@ -288,7 +290,7 @@ sub put {
   $remote = $self->{'cwd'}. "/$remote" if $self->{'cwd'} && $remote !~ /^\//;
   my $dest = $self->{'host'}. ":$remote";
   $dest = $self->{'user'}. '@'. $dest if $self->{'user'};
-  warn "scp $local $dest\n";
+  warn "scp $local $dest\n" if $DEBUG;
   $self->scp($local, $dest);
 }