line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DDG::Meta; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:DDG'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Main meta layer implementation factory... dark side of the moon... |
4
|
|
|
|
|
|
|
$DDG::Meta::VERSION = '1017'; |
5
|
11
|
|
|
11
|
|
67
|
use strict; |
|
11
|
|
|
|
|
21
|
|
|
11
|
|
|
|
|
271
|
|
6
|
11
|
|
|
11
|
|
50
|
use warnings; |
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
210
|
|
7
|
11
|
|
|
11
|
|
50
|
use Carp; |
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
636
|
|
8
|
|
|
|
|
|
|
require Data::Printer; |
9
|
|
|
|
|
|
|
|
10
|
11
|
|
|
11
|
|
3965
|
use DDG::Meta::RequestHandler; |
|
11
|
|
|
|
|
30
|
|
|
11
|
|
|
|
|
301
|
|
11
|
11
|
|
|
11
|
|
3866
|
use DDG::Meta::ZeroClickInfo; |
|
11
|
|
|
|
|
31
|
|
|
11
|
|
|
|
|
311
|
|
12
|
11
|
|
|
11
|
|
3218
|
use DDG::Meta::ZeroClickInfoSpice; |
|
11
|
|
|
|
|
36
|
|
|
11
|
|
|
|
|
351
|
|
13
|
11
|
|
|
11
|
|
4258
|
use DDG::Meta::Fathead; |
|
11
|
|
|
|
|
26
|
|
|
11
|
|
|
|
|
278
|
|
14
|
11
|
|
|
11
|
|
3651
|
use DDG::Meta::ShareDir; |
|
11
|
|
|
|
|
42
|
|
|
11
|
|
|
|
|
353
|
|
15
|
11
|
|
|
11
|
|
4150
|
use DDG::Meta::Block; |
|
11
|
|
|
|
|
81
|
|
|
11
|
|
|
|
|
272
|
|
16
|
11
|
|
|
11
|
|
4171
|
use DDG::Meta::Information; |
|
11
|
|
|
|
|
31
|
|
|
11
|
|
|
|
|
403
|
|
17
|
11
|
|
|
11
|
|
3915
|
use DDG::Meta::Helper; |
|
11
|
|
|
|
|
33
|
|
|
11
|
|
|
|
|
294
|
|
18
|
11
|
|
|
11
|
|
3897
|
use DDG::Meta::AnyBlock; |
|
11
|
|
|
|
|
27
|
|
|
11
|
|
|
|
|
275
|
|
19
|
11
|
|
|
11
|
|
3648
|
use DDG::Meta::CountryCodes; |
|
11
|
|
|
|
|
39
|
|
|
11
|
|
|
|
|
392
|
|
20
|
|
|
|
|
|
|
|
21
|
11
|
|
|
11
|
|
3993
|
use MooX (); |
|
11
|
|
|
|
|
22992
|
|
|
11
|
|
|
|
|
3407
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
require Moo::Role; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub apply_base_to_package { |
27
|
45
|
|
|
45
|
1
|
121
|
my ( $class, $target ) = @_; |
28
|
|
|
|
|
|
|
|
29
|
45
|
|
|
|
|
332
|
MooX->import::into($target, qw( |
30
|
|
|
|
|
|
|
+Data::Printer |
31
|
|
|
|
|
|
|
)); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub apply_goodie_keywords { |
36
|
24
|
|
|
24
|
1
|
75
|
my ( $class, $target ) = @_; |
37
|
24
|
|
|
|
|
176
|
DDG::Meta::ZeroClickInfo->apply_keywords($target); |
38
|
24
|
|
|
|
|
194
|
DDG::Meta::ShareDir->apply_keywords($target); |
39
|
24
|
|
|
|
|
208
|
DDG::Meta::Block->apply_keywords($target); |
40
|
24
|
|
|
|
|
24810
|
DDG::Meta::Information->apply_keywords($target); |
41
|
24
|
|
|
|
|
11926
|
DDG::Meta::Helper->apply_keywords($target); |
42
|
|
|
|
|
|
|
DDG::Meta::RequestHandler->apply_keywords($target,sub { |
43
|
|
|
|
|
|
|
shift->zci_new( |
44
|
34
|
50
|
33
|
34
|
|
342
|
scalar @_ == 1 && ref $_[0] eq 'HASH' ? $_[0] : |
|
|
50
|
|
|
|
|
|
45
|
|
|
|
|
|
|
@_ % 2 ? ( answer => @_ ) : @_ |
46
|
|
|
|
|
|
|
); |
47
|
24
|
|
|
|
|
224
|
},'DDG::IsGoodie'); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub apply_spice_keywords { |
52
|
11
|
|
|
11
|
1
|
33
|
my ( $class, $target ) = @_; |
53
|
11
|
|
|
|
|
76
|
DDG::Meta::ZeroClickInfoSpice->apply_keywords($target); |
54
|
11
|
|
|
|
|
79
|
DDG::Meta::ShareDir->apply_keywords($target); |
55
|
11
|
|
|
|
|
77
|
DDG::Meta::Block->apply_keywords($target); |
56
|
11
|
|
|
|
|
11604
|
DDG::Meta::Information->apply_keywords($target); |
57
|
11
|
|
|
|
|
5730
|
DDG::Meta::Helper->apply_keywords($target); |
58
|
|
|
|
|
|
|
DDG::Meta::RequestHandler->apply_keywords($target,sub { |
59
|
11
|
|
|
11
|
|
42
|
shift->spice_new(@_); |
60
|
11
|
|
|
|
|
104
|
},'DDG::IsSpice'); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub apply_fathead_keywords { |
65
|
5
|
|
|
5
|
1
|
17
|
my ( $class, $target ) = @_; |
66
|
5
|
|
|
|
|
37
|
DDG::Meta::ZeroClickInfo->apply_keywords($target); |
67
|
5
|
|
|
|
|
40
|
DDG::Meta::ShareDir->apply_keywords($target); |
68
|
5
|
|
|
|
|
38
|
DDG::Meta::Fathead->apply_keywords($target); |
69
|
5
|
|
|
|
|
38
|
DDG::Meta::Information->apply_keywords($target); |
70
|
5
|
|
|
|
|
3122
|
DDG::Meta::AnyBlock->apply_keywords($target); |
71
|
5
|
|
|
|
|
4722
|
Moo::Role->apply_role_to_package($target, "DDG::IsFathead"); |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub apply_longtail_keywords { |
76
|
5
|
|
|
5
|
1
|
16
|
my ( $class, $target ) = @_; |
77
|
5
|
|
|
|
|
40
|
DDG::Meta::ZeroClickInfo->apply_keywords($target); |
78
|
5
|
|
|
|
|
41
|
DDG::Meta::ShareDir->apply_keywords($target); |
79
|
5
|
|
|
|
|
44
|
DDG::Meta::Information->apply_keywords($target); |
80
|
5
|
|
|
|
|
3027
|
DDG::Meta::AnyBlock->apply_keywords($target); |
81
|
5
|
|
|
|
|
4671
|
Moo::Role->apply_role_to_package($target, "DDG::IsLongtail"); |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |