line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OpenSSH::Compat; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.09'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
13440
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
7
|
1
|
|
|
1
|
|
3
|
use Carp; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
160
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my %impl = ('Net::SSH2' => 'SSH2', |
10
|
|
|
|
|
|
|
'Net::SSH::Perl' => 'Perl', |
11
|
|
|
|
|
|
|
'Net::SSH' => 'SSH'); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub import { |
14
|
1
|
|
|
1
|
|
7
|
my $class = shift; |
15
|
1
|
|
|
|
|
2
|
for my $mod (@_) { |
16
|
0
|
|
|
|
|
0
|
my $impl = $impl{$mod}; |
17
|
0
|
0
|
|
|
|
0
|
defined $impl or croak "$mod compatibility is not available"; |
18
|
0
|
|
|
|
|
0
|
my $adapter = __PACKAGE__ . "::$impl"; |
19
|
0
|
|
|
|
|
0
|
eval "use $adapter ':supplant';"; |
20
|
0
|
0
|
|
|
|
0
|
die if $@; |
21
|
|
|
|
|
|
|
} |
22
|
1
|
|
|
|
|
6
|
1; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
__END__ |