line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
1
|
|
|
1
|
|
69959
|
use File::Slurp::Remote; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
20
|
|
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
26
|
|
6
|
1
|
|
|
1
|
|
4
|
use File::Slurp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
58
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
1
|
|
|
1
|
|
594
|
use File::Slurp::Remote::BrokenDNS qw($myfqdn %fqdnify); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
176
|
|
9
|
1
|
|
|
1
|
|
9
|
use Tie::Function::Examples qw(%q_shell); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
252
|
|
10
|
1
|
|
|
1
|
|
787
|
use File::Slurp::Remote::SmartOpen; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
71
|
|
11
|
1
|
|
|
1
|
|
5
|
use File::Temp qw(tempdir); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
403
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
14
|
|
|
|
|
|
|
our @EXPORT = (@File::Slurp::EXPORT, qw(write_remote_file read_remote_file)); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = 0.42; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $tmpdir = tempdir(CLEANUP => 1); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $scp = "scp -q -o StrictHostKeyChecking=no -o BatchMode=yes -o PasswordAuthentication=no"; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub write_remote_file |
23
|
|
|
|
|
|
|
{ |
24
|
0
|
|
|
0
|
|
|
my $host = shift; |
25
|
0
|
|
|
|
|
|
my $file = shift; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
my $fd; |
28
|
0
|
|
|
|
|
|
smartopen("$host:$file", $fd, "w"); |
29
|
0
|
0
|
|
|
|
|
(print $fd @_) or die "write to $host:$file: $!"; |
30
|
0
|
0
|
|
|
|
|
close($fd) or die "close $host:$file: $!"; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub read_remote_file |
34
|
|
|
|
|
|
|
{ |
35
|
0
|
|
|
0
|
|
|
my $host = shift; |
36
|
0
|
|
|
|
|
|
my $file = shift; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
my $fd; |
39
|
0
|
|
|
|
|
|
smartopen("$host:$file", $fd, "r"); |
40
|
0
|
0
|
|
|
|
|
if (wantarray) { |
41
|
0
|
|
|
|
|
|
return <$fd>; |
42
|
|
|
|
|
|
|
} else { |
43
|
0
|
|
|
|
|
|
return join('', <$fd>); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |