line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OpenSSH::Compat; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.08'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
13512
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
6
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
20
|
|
7
|
1
|
|
|
1
|
|
3
|
use Carp; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
158
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my %impl = ('Net::SSH2' => 'SSH2', |
10
|
|
|
|
|
|
|
'Net::SSH::Perl' => 'Perl', |
11
|
|
|
|
|
|
|
'Net::SSH' => 'SSH'); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub import { |
14
|
1
|
|
|
1
|
|
10
|
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
|
|
|
|
|
10
|
1; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
__END__ |