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