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