| line |
true |
false |
branch |
|
22
|
0 |
23 |
if @_ |
|
25
|
2 |
21 |
unless defined $what |
|
28
|
0 |
21 |
if ref $opt ne 'HASH' |
|
32
|
2 |
15 |
if none sub {
$key eq $_;
}
, 'atomic', 'LOCK_SH', 'LOCK_EX', 'LOCK_NB' |
|
38
|
3 |
16 |
if ($type eq 'string') |
|
39
|
15 |
1 |
if ($type eq 'file') |
|
40
|
2 |
13 |
$$opt{'atomic'} ? : |
|
41
|
0 |
15 |
unless $fh->open($proper_what, $how) |
|
45
|
8 |
7 |
if ($$opt{'LOCK_SH'} or $$opt{'LOCK_EX'}) |
|
46
|
3 |
5 |
$$opt{'LOCK_SH'} ? : |
|
|
5 |
3 |
$$opt{'LOCK_EX'} ? : |
|
|
5 |
3 |
$$opt{'LOCK_NB'} ? : |
|
|
4 |
4 |
unless flock $fh, ($$opt{'LOCK_SH'} ? 1 : 0) | ($$opt{'LOCK_EX'} ? 2 : 0) | ($$opt{'LOCK_NB'} ? 4 : 0) |
|
55
|
1 |
0 |
if ($type eq 'iofile') |
|
56
|
0 |
0 |
if ($type eq 'iostring') |
|
57
|
0 |
0 |
if ($type eq 'http') |
|
64
|
30 |
1 |
if (not blessed $what) { } |
|
|
0 |
1 |
elsif ($what->isa('Path::Class::File')) { } |
|
|
1 |
0 |
elsif (any sub {
$what->isa($_);
}
, 'IO::File', 'IO::AtomicFile', 'IO::Uncompress::Bunzip2') { } |
|
|
0 |
0 |
elsif ($what->isa('IO::String')) { } |
|
67
|
0 |
1 |
unless $what->opened |
|
75
|
16 |
14 |
if ($ref_what eq 'ARRAY') { } |
|
|
1 |
13 |
elsif ($ref_what eq 'SCALAR') { } |
|
|
13 |
0 |
elsif ($ref_what eq '') { } |
|
81
|
1 |
12 |
if (ref \$what eq 'GLOB' and my $fh = *{$what;}{'IO'}) |
|
85
|
1 |
11 |
if ($what =~ m[^file://(.+)$]) |
|
86
|
2 |
9 |
if ($what =~ m[^https?://]) |
|
87
|
1 |
8 |
if ($what =~ /^) |
|
88
|
2 |
6 |
if ($what =~ /^{/) |
|
89
|
1 |
5 |
if ($what =~ /^\[/) |
|
90
|
1 |
4 |
if ($what =~ /\n[\s\w]/) |
|
91
|
2 |
2 |
if ($what eq '') |
|
99
|
0 |
10 |
if @_ |
|
109
|
0 |
2 |
if @_ |
|
119
|
0 |
4 |
if @_ |
|
126
|
0 |
0 |
if ($INC{'AnyEvent.pm'} and not $fh->isa('IO::String') and $^O ne 'MSWin32') |
|
127
|
0 |
0 |
unless $INC{'AnyEvent/Handle.pm'} |
|
162
|
0 |
5 |
if @_ |
|
171
|
0 |
4 |
if ($INC{'AnyEvent.pm'} and not $fh->isa('IO::String')) |
|
172
|
0 |
0 |
unless $INC{'AnyEvent/Handle.pm'} |
|
197
|
0 |
4 |
unless $fh->close |