line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Parse::Flexget; |
2
|
2
|
|
|
2
|
|
56377
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
87
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
BEGIN { |
5
|
2
|
|
|
2
|
|
11
|
use Exporter; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
90
|
|
6
|
2
|
|
|
2
|
|
9
|
use vars qw($VERSION @ISA @EXPORT_OK); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
185
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
5
|
$VERSION = '0.014'; |
9
|
2
|
|
|
|
|
28
|
@ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
|
|
64
|
@EXPORT_OK = qw( |
12
|
|
|
|
|
|
|
flexparse |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
2
|
|
11
|
use Carp qw(croak); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
483
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub flexparse { |
19
|
1
|
|
|
1
|
1
|
50
|
my @data; |
20
|
1
|
50
|
|
|
|
9
|
if(ref($_[0]) eq 'ARRAY') { |
|
|
50
|
|
|
|
|
|
21
|
0
|
|
|
|
|
0
|
push(@data, @{$_[0]}); |
|
0
|
|
|
|
|
0
|
|
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
elsif(ref($_[0]) eq '') { |
24
|
1
|
|
|
|
|
27
|
push(@data, @_); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
else { |
27
|
0
|
|
|
|
|
0
|
croak("Reference type " . ref($_[0]) . " not supported\n"); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
3
|
my @downloads; |
31
|
1
|
|
|
|
|
4
|
for my $element(@data) { |
32
|
44
|
100
|
|
|
|
101
|
if($element =~ m/Downloading: (\S+)/) { |
33
|
1
|
|
|
|
|
6
|
push(@downloads, $1); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
1
|
50
|
|
|
|
13
|
return wantarray() ? @downloads : scalar(@downloads); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |