line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::xFTP;
|
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
require 5.001;
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
13578
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
3
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
8
|
1
|
|
|
1
|
|
5
|
use vars qw(@ISA $VERSION %CONSTANTS);
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
62
|
|
9
|
1
|
|
|
1
|
|
4
|
use Carp;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
62
|
|
10
|
1
|
|
|
1
|
|
5
|
use Cwd 'cwd';
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
1257
|
|
11
|
|
|
|
|
|
|
#x use Fcntl ':mode';
|
12
|
|
|
|
|
|
|
#x use File::Copy;
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my @supported_mods = (qw(ftp sftp ssh2 local foreign openssh fsp ftpssl));
|
15
|
|
|
|
|
|
|
my %haveit;
|
16
|
|
|
|
|
|
|
my $haveSFTPConstants = 0;
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
foreach my $imod (@supported_mods)
|
19
|
|
|
|
|
|
|
{
|
20
|
|
|
|
|
|
|
$haveit{$imod} = 0;
|
21
|
|
|
|
|
|
|
}
|
22
|
|
|
|
|
|
|
$haveit{'local'} = 1; #JWT:ADDED 20150123 - WE *ALWAYS* HAVE "local", SINCE NO EXTERNAL MODULE REQUIRED!
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my $bummer = ($^O =~ /Win/o) ? 1 : 0;
|
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
|
604
|
eval 'use Net::FTP; $haveit{"ftp"} = 1; 1';
|
|
1
|
|
|
|
|
42649
|
|
|
1
|
|
|
|
|
48
|
|
27
|
1
|
|
|
1
|
|
260
|
eval 'use Net::SFTP; $haveit{"sftp"} = 1; 1';
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
28
|
1
|
|
|
1
|
|
178
|
eval 'use Net::SFTP::Constants qw(SSH2_FXF_WRITE SSH2_FXF_CREAT SSH2_FXF_TRUNC); $haveSFTPConstants = 1; 1';
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
29
|
1
|
|
|
1
|
|
169
|
eval 'use Net::SSH2; use Net::SSH2::SFTP; $haveit{"ssh2"} = 1; 1';
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
30
|
1
|
|
|
1
|
|
130
|
eval 'use Net::SFTP::Foreign; $haveit{"foreign"} = 1; 1';
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
31
|
1
|
|
|
1
|
|
162
|
eval 'use Net::OpenSSH; use IO::Pty; $haveit{"openssh"} = 1; 1';
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
32
|
1
|
|
|
1
|
|
169
|
eval 'use Net::FSP; $haveit{"fsp"} = 1; 1';
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
33
|
1
|
|
|
1
|
|
174
|
eval 'use Net::FTPSSL; $haveit{"ftpssl"} = 1; 1';
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
our $VERSION = '1.01';
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub new
|
38
|
|
|
|
|
|
|
{
|
39
|
0
|
|
|
0
|
1
|
|
my $class = shift;
|
40
|
0
|
|
|
|
|
|
$@ = '';
|
41
|
0
|
|
0
|
|
|
|
my $pkg = shift || 0;
|
42
|
0
|
|
|
|
|
|
$pkg =~ s/\s+//go;
|
43
|
0
|
0
|
0
|
|
|
|
$pkg = 'Net::' . $pkg unless (!$pkg || $pkg =~ /^Net/o);
|
44
|
0
|
0
|
|
|
|
|
$pkg = 'Net::SFTP::Foreign' if ($pkg eq 'Net::Foreign'); #FIXUP.
|
45
|
0
|
|
|
|
|
|
my $host = shift;
|
46
|
0
|
|
|
|
|
|
my %args = @_;
|
47
|
0
|
|
|
|
|
|
my $xftp;
|
48
|
|
|
|
|
|
|
my %xftp_args;
|
49
|
0
|
|
|
|
|
|
my ($i, $j, $t);
|
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
foreach $i (keys %args)
|
52
|
|
|
|
|
|
|
{
|
53
|
0
|
0
|
|
|
|
|
if ($i =~ s/^xftp_//o) #EXTRACT OUT OUR SPECIAL ARGS ("xftp_*")
|
54
|
|
|
|
|
|
|
{
|
55
|
0
|
|
|
|
|
|
$xftp_args{$i} = $args{"xftp_$i"};
|
56
|
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
delete $args{"xftp_$i"};
|
58
|
|
|
|
|
|
|
}
|
59
|
|
|
|
|
|
|
}
|
60
|
0
|
0
|
0
|
|
|
|
if ($pkg =~ /Net::FTPSSL/)
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
61
|
|
|
|
|
|
|
{
|
62
|
0
|
|
|
|
|
|
eval { require "Net/xFTP_FTPSSL.pm" };
|
|
0
|
|
|
|
|
|
|
63
|
0
|
0
|
0
|
|
|
|
if ($@ || !$haveit{'ftpssl'})
|
64
|
|
|
|
|
|
|
{
|
65
|
0
|
|
|
|
|
|
warn "xFTP:Could not require Net::xFTP_FTPSSL.pm module($@)!";
|
66
|
0
|
|
|
|
|
|
return undef;
|
67
|
|
|
|
|
|
|
}
|
68
|
0
|
|
|
|
|
|
foreach $i (keys %args)
|
69
|
|
|
|
|
|
|
{
|
70
|
0
|
|
|
|
|
|
foreach $j (@supported_mods)
|
71
|
|
|
|
|
|
|
{
|
72
|
0
|
0
|
|
|
|
|
if ($i =~ /^${j}\_/)
|
73
|
|
|
|
|
|
|
{
|
74
|
0
|
0
|
|
|
|
|
if ($j eq 'ftpssl')
|
75
|
|
|
|
|
|
|
{
|
76
|
0
|
|
|
|
|
|
($t = $i) =~ s/^${j}_//;
|
77
|
0
|
|
|
|
|
|
$args{$t} = $args{$i};
|
78
|
|
|
|
|
|
|
}
|
79
|
0
|
|
|
|
|
|
delete $args{$i};
|
80
|
|
|
|
|
|
|
}
|
81
|
|
|
|
|
|
|
}
|
82
|
|
|
|
|
|
|
}
|
83
|
0
|
|
|
|
|
|
$xftp = Net::xFTP::FTPSSL::new_ftpssl("${class}::FTPSSL", $pkg, $host, %args);
|
84
|
|
|
|
|
|
|
}
|
85
|
|
|
|
|
|
|
elsif ($pkg =~ /Net::FTP/)
|
86
|
|
|
|
|
|
|
{
|
87
|
0
|
|
|
|
|
|
eval { require "Net/xFTP_FTP.pm" };
|
|
0
|
|
|
|
|
|
|
88
|
0
|
0
|
0
|
|
|
|
if ($@ || !$haveit{'ftp'})
|
89
|
|
|
|
|
|
|
{
|
90
|
0
|
|
|
|
|
|
warn "xFTP:Could not require Net::xFTP_FTP.pm module($@)!";
|
91
|
0
|
|
|
|
|
|
return undef;
|
92
|
|
|
|
|
|
|
}
|
93
|
0
|
|
|
|
|
|
foreach $i (keys %args)
|
94
|
|
|
|
|
|
|
{
|
95
|
0
|
|
|
|
|
|
foreach $j (@supported_mods)
|
96
|
|
|
|
|
|
|
{
|
97
|
0
|
0
|
|
|
|
|
if ($i =~ /^${j}\_/)
|
98
|
|
|
|
|
|
|
{
|
99
|
0
|
0
|
|
|
|
|
if ($j eq 'ftp')
|
100
|
|
|
|
|
|
|
{
|
101
|
0
|
|
|
|
|
|
($t = $i) =~ s/^${j}_//;
|
102
|
0
|
|
|
|
|
|
$args{$t} = $args{$i};
|
103
|
|
|
|
|
|
|
}
|
104
|
0
|
|
|
|
|
|
delete $args{$i};
|
105
|
|
|
|
|
|
|
}
|
106
|
|
|
|
|
|
|
}
|
107
|
|
|
|
|
|
|
}
|
108
|
0
|
|
|
|
|
|
$xftp = Net::xFTP::FTP::new_ftp("${class}::FTP", $pkg, $host, %args);
|
109
|
|
|
|
|
|
|
}
|
110
|
|
|
|
|
|
|
elsif ($pkg =~ /Net::SFTP::Foreign/)
|
111
|
|
|
|
|
|
|
{
|
112
|
0
|
|
|
|
|
|
eval { require "Net/xFTP_Foreign.pm" };
|
|
0
|
|
|
|
|
|
|
113
|
0
|
0
|
0
|
|
|
|
if ($@ || !$haveit{'foreign'})
|
114
|
|
|
|
|
|
|
{
|
115
|
0
|
|
|
|
|
|
warn "xFTP:Could not require Net::xFTP_Foreign.pm module($@)!";
|
116
|
0
|
|
|
|
|
|
return undef;
|
117
|
|
|
|
|
|
|
}
|
118
|
0
|
|
|
|
|
|
foreach $i (keys %args)
|
119
|
|
|
|
|
|
|
{
|
120
|
0
|
|
|
|
|
|
foreach $j (@supported_mods)
|
121
|
|
|
|
|
|
|
{
|
122
|
0
|
0
|
|
|
|
|
if ($i =~ /^${j}\_/)
|
123
|
|
|
|
|
|
|
{
|
124
|
0
|
0
|
|
|
|
|
if ($j eq 'foreign')
|
125
|
|
|
|
|
|
|
{
|
126
|
0
|
|
|
|
|
|
($t = $i) =~ s/^${j}_//;
|
127
|
0
|
|
|
|
|
|
$args{$t} = $args{$i};
|
128
|
|
|
|
|
|
|
}
|
129
|
0
|
|
|
|
|
|
delete $args{$i};
|
130
|
|
|
|
|
|
|
}
|
131
|
|
|
|
|
|
|
}
|
132
|
|
|
|
|
|
|
}
|
133
|
0
|
|
|
|
|
|
$xftp = Net::xFTP::Foreign::new_foreign("${class}::Foreign", $pkg, $host, %args);
|
134
|
|
|
|
|
|
|
}
|
135
|
|
|
|
|
|
|
elsif ($pkg =~ /Net::SSH2/)
|
136
|
|
|
|
|
|
|
{
|
137
|
0
|
|
|
|
|
|
eval { require "Net/xFTP_SSH2.pm" };
|
|
0
|
|
|
|
|
|
|
138
|
0
|
0
|
0
|
|
|
|
if ($@ || !$haveit{'ssh2'})
|
139
|
|
|
|
|
|
|
{
|
140
|
0
|
|
|
|
|
|
warn "xFTP:Could not require Net::xFTP_SSH2.pm module($@)!";
|
141
|
0
|
|
|
|
|
|
return undef;
|
142
|
|
|
|
|
|
|
}
|
143
|
0
|
|
|
|
|
|
foreach $i (keys %args)
|
144
|
|
|
|
|
|
|
{
|
145
|
0
|
|
|
|
|
|
foreach $j (@supported_mods)
|
146
|
|
|
|
|
|
|
{
|
147
|
0
|
0
|
|
|
|
|
if ($i =~ /^${j}\_/)
|
148
|
|
|
|
|
|
|
{
|
149
|
0
|
0
|
|
|
|
|
if ($j eq 'ssh2')
|
150
|
|
|
|
|
|
|
{
|
151
|
0
|
|
|
|
|
|
($t = $i) =~ s/^${j}_//;
|
152
|
0
|
|
|
|
|
|
$args{$t} = $args{$i};
|
153
|
|
|
|
|
|
|
}
|
154
|
0
|
|
|
|
|
|
delete $args{$i};
|
155
|
|
|
|
|
|
|
}
|
156
|
|
|
|
|
|
|
}
|
157
|
|
|
|
|
|
|
}
|
158
|
0
|
|
|
|
|
|
$xftp = Net::xFTP::SSH2::new_ssh2("${class}::SSH2", $pkg, $host, %args);
|
159
|
|
|
|
|
|
|
}
|
160
|
|
|
|
|
|
|
elsif ($pkg =~ /Net::SFTP/)
|
161
|
|
|
|
|
|
|
{
|
162
|
0
|
|
|
|
|
|
eval { require "Net/xFTP_SFTP.pm" };
|
|
0
|
|
|
|
|
|
|
163
|
0
|
0
|
0
|
|
|
|
if ($@ || !$haveit{'sftp'})
|
164
|
|
|
|
|
|
|
{
|
165
|
0
|
|
|
|
|
|
warn "xFTP:Could not require Net::xFTP_SFTP.pm module($@)!";
|
166
|
0
|
|
|
|
|
|
return undef;
|
167
|
|
|
|
|
|
|
}
|
168
|
0
|
|
|
|
|
|
foreach $i (keys %args)
|
169
|
|
|
|
|
|
|
{
|
170
|
0
|
|
|
|
|
|
foreach $j (@supported_mods)
|
171
|
|
|
|
|
|
|
{
|
172
|
0
|
0
|
|
|
|
|
if ($i =~ /^${j}\_/)
|
173
|
|
|
|
|
|
|
{
|
174
|
0
|
0
|
|
|
|
|
if ($j eq 'sftp')
|
175
|
|
|
|
|
|
|
{
|
176
|
0
|
|
|
|
|
|
($t = $i) =~ s/^${j}_//;
|
177
|
0
|
|
|
|
|
|
$args{$t} = $args{$i};
|
178
|
|
|
|
|
|
|
}
|
179
|
0
|
|
|
|
|
|
delete $args{$i};
|
180
|
|
|
|
|
|
|
}
|
181
|
|
|
|
|
|
|
}
|
182
|
|
|
|
|
|
|
}
|
183
|
0
|
|
|
|
|
|
$xftp = Net::xFTP::SFTP::new_sftp("${class}::SFTP", $pkg, $host, %args);
|
184
|
0
|
0
|
|
|
|
|
$xftp->{haveSFTPConstants} = $haveSFTPConstants if ($xftp);
|
185
|
|
|
|
|
|
|
}
|
186
|
|
|
|
|
|
|
elsif ($pkg =~ /Net::FSP/)
|
187
|
|
|
|
|
|
|
{
|
188
|
0
|
|
|
|
|
|
eval { require "Net/xFTP_FSP.pm" };
|
|
0
|
|
|
|
|
|
|
189
|
0
|
0
|
0
|
|
|
|
if ($@ || !$haveit{'fsp'})
|
190
|
|
|
|
|
|
|
{
|
191
|
0
|
|
|
|
|
|
warn "xFTP:Could not require Net::xFTP_FSP.pm module($@)!";
|
192
|
0
|
|
|
|
|
|
return undef;
|
193
|
|
|
|
|
|
|
}
|
194
|
0
|
|
|
|
|
|
foreach $i (keys %args)
|
195
|
|
|
|
|
|
|
{
|
196
|
0
|
|
|
|
|
|
foreach $j (@supported_mods)
|
197
|
|
|
|
|
|
|
{
|
198
|
0
|
0
|
|
|
|
|
if ($i =~ /^${j}\_/)
|
199
|
|
|
|
|
|
|
{
|
200
|
0
|
0
|
|
|
|
|
if ($j eq 'fsp')
|
201
|
|
|
|
|
|
|
{
|
202
|
0
|
|
|
|
|
|
($t = $i) =~ s/^${j}_//;
|
203
|
0
|
|
|
|
|
|
$args{$t} = $args{$i};
|
204
|
|
|
|
|
|
|
}
|
205
|
0
|
|
|
|
|
|
delete $args{$i};
|
206
|
|
|
|
|
|
|
}
|
207
|
|
|
|
|
|
|
}
|
208
|
|
|
|
|
|
|
}
|
209
|
0
|
|
|
|
|
|
$xftp = Net::xFTP::FSP::new_fsp("${class}::FSP", $pkg, $host, %args);
|
210
|
|
|
|
|
|
|
}
|
211
|
|
|
|
|
|
|
elsif ($pkg =~ /Net::OpenSSH/)
|
212
|
|
|
|
|
|
|
{
|
213
|
0
|
|
|
|
|
|
eval { require "Net/xFTP_OpenSSH.pm" };
|
|
0
|
|
|
|
|
|
|
214
|
0
|
0
|
0
|
|
|
|
if ($@ || !$haveit{'openssh'})
|
215
|
|
|
|
|
|
|
{
|
216
|
0
|
|
|
|
|
|
warn "xFTP:Could not require Net::xFTP_OpenSSH.pm module($@)!";
|
217
|
0
|
|
|
|
|
|
return undef;
|
218
|
|
|
|
|
|
|
}
|
219
|
0
|
|
|
|
|
|
foreach $i (keys %args)
|
220
|
|
|
|
|
|
|
{
|
221
|
0
|
|
|
|
|
|
foreach $j (@supported_mods)
|
222
|
|
|
|
|
|
|
{
|
223
|
0
|
0
|
|
|
|
|
if ($i =~ /^${j}\_/)
|
224
|
|
|
|
|
|
|
{
|
225
|
0
|
0
|
|
|
|
|
if ($j eq 'openssh')
|
226
|
|
|
|
|
|
|
{
|
227
|
0
|
|
|
|
|
|
($t = $i) =~ s/^${j}_//;
|
228
|
0
|
|
|
|
|
|
$args{$t} = $args{$i};
|
229
|
|
|
|
|
|
|
}
|
230
|
0
|
|
|
|
|
|
delete $args{$i};
|
231
|
|
|
|
|
|
|
}
|
232
|
|
|
|
|
|
|
}
|
233
|
|
|
|
|
|
|
}
|
234
|
0
|
|
|
|
|
|
$xftp = Net::xFTP::OpenSSH::new_openssh("${class}::OpenSSH", $pkg, $host, %args);
|
235
|
|
|
|
|
|
|
}
|
236
|
|
|
|
|
|
|
elsif (!$pkg || $pkg =~ /local/i)
|
237
|
|
|
|
|
|
|
{
|
238
|
0
|
|
|
|
|
|
eval { require "Net/xFTP_LOCAL.pm" };
|
|
0
|
|
|
|
|
|
|
239
|
0
|
0
|
|
|
|
|
if ($@)
|
240
|
|
|
|
|
|
|
{
|
241
|
0
|
|
|
|
|
|
warn "xFTP:Could not require Net::xFTP_LOCAL.pm module($@)!";
|
242
|
0
|
|
|
|
|
|
return undef;
|
243
|
|
|
|
|
|
|
}
|
244
|
0
|
|
|
|
|
|
foreach $i (keys %args)
|
245
|
|
|
|
|
|
|
{
|
246
|
0
|
|
|
|
|
|
foreach $j (@supported_mods)
|
247
|
|
|
|
|
|
|
{
|
248
|
0
|
0
|
|
|
|
|
if ($i =~ /^${j}\_/)
|
249
|
|
|
|
|
|
|
{
|
250
|
0
|
0
|
|
|
|
|
if ($j eq 'local')
|
251
|
|
|
|
|
|
|
{
|
252
|
0
|
|
|
|
|
|
($t = $i) =~ s/^${j}_//;
|
253
|
0
|
|
|
|
|
|
$args{$t} = $args{$i};
|
254
|
|
|
|
|
|
|
}
|
255
|
0
|
|
|
|
|
|
delete $args{$i};
|
256
|
|
|
|
|
|
|
}
|
257
|
|
|
|
|
|
|
}
|
258
|
|
|
|
|
|
|
}
|
259
|
0
|
|
|
|
|
|
$xftp = Net::xFTP::LOCAL::new_local("${class}::LOCAL", $pkg, $host, %args);
|
260
|
|
|
|
|
|
|
}
|
261
|
|
|
|
|
|
|
else
|
262
|
|
|
|
|
|
|
{
|
263
|
0
|
|
|
|
|
|
$@ = "No such package \"$pkg\"!";
|
264
|
0
|
|
|
|
|
|
warn "xFTP:$@!";
|
265
|
0
|
|
|
|
|
|
return undef;
|
266
|
|
|
|
|
|
|
}
|
267
|
|
|
|
|
|
|
|
268
|
0
|
0
|
|
|
|
|
if ($xftp)
|
269
|
|
|
|
|
|
|
{
|
270
|
0
|
0
|
|
|
|
|
$xftp->{pkg} = ($pkg =~ /local/io) ? $pkg : '';
|
271
|
0
|
0
|
|
|
|
|
$xftp->{bummer} = ($^O =~ /Win/o) ? 1 : 0;
|
272
|
0
|
|
|
|
|
|
return $xftp;
|
273
|
|
|
|
|
|
|
}
|
274
|
|
|
|
|
|
|
else
|
275
|
|
|
|
|
|
|
{
|
276
|
0
|
|
|
|
|
|
@_ = @_ . " Could not get new $pkg object (undef)!";
|
277
|
|
|
|
|
|
|
}
|
278
|
0
|
|
|
|
|
|
return undef;
|
279
|
|
|
|
|
|
|
}
|
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
sub haveFTP #DEPRECIATED, USE haveModule($module) INSTEAD!
|
282
|
|
|
|
|
|
|
{
|
283
|
0
|
|
|
0
|
1
|
|
return $haveit{'ftp'};
|
284
|
|
|
|
|
|
|
}
|
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
sub haveSFTP
|
287
|
|
|
|
|
|
|
{
|
288
|
0
|
|
|
0
|
1
|
|
return $haveit{'sftp'};
|
289
|
|
|
|
|
|
|
}
|
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
sub haveModule
|
292
|
|
|
|
|
|
|
{
|
293
|
0
|
|
|
0
|
1
|
|
my $self = shift;
|
294
|
0
|
|
|
|
|
|
my $modul = shift;
|
295
|
|
|
|
|
|
|
|
296
|
0
|
|
|
|
|
|
my $modHash = &haveModules();
|
297
|
0
|
0
|
|
|
|
|
if ($modul =~ /^Net\:\:/) {
|
298
|
0
|
0
|
|
|
|
|
return (defined $modHash->{$modul}) ? $modHash->{$modul} : 0;
|
299
|
|
|
|
|
|
|
}
|
300
|
0
|
|
|
|
|
|
$modul =~ tr/A-Z/a-z/;
|
301
|
0
|
0
|
|
|
|
|
return (defined $haveit{$modul}) ? $haveit{$modul} : 0;
|
302
|
|
|
|
|
|
|
}
|
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
sub haveModules
|
305
|
|
|
|
|
|
|
{
|
306
|
|
|
|
|
|
|
return { 'Net::FTP' => $haveit{'ftp'}, 'Net::SFTP' => $haveit{'sftp'},
|
307
|
|
|
|
|
|
|
'Net::SSH2' => $haveit{'ssh2'}, 'Net::SFTP::Foreign' => $haveit{'foreign'},
|
308
|
|
|
|
|
|
|
'Net::OpenSSH' => $haveit{'openssh'}, 'Net::FSP' => $haveit{'fsp'},
|
309
|
0
|
|
|
0
|
1
|
|
'Net::FTPSSL' => $haveit{'ftpssl'}};
|
310
|
|
|
|
|
|
|
}
|
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
sub protocol
|
313
|
|
|
|
|
|
|
{
|
314
|
0
|
|
|
0
|
1
|
|
my $self = shift;
|
315
|
|
|
|
|
|
|
|
316
|
0
|
|
|
|
|
|
return $self->{pkg};
|
317
|
|
|
|
|
|
|
}
|
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
1
|
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
__END__
|