line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::Caching::DeprecationWarning; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
680331
|
use strict; |
|
8
|
|
|
|
|
46
|
|
|
8
|
|
|
|
|
179
|
|
4
|
8
|
|
|
8
|
|
33
|
use warnings; |
|
8
|
|
|
|
|
10
|
|
|
8
|
|
|
|
|
186
|
|
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
37
|
use feature 'state'; |
|
8
|
|
|
|
|
26
|
|
|
8
|
|
|
|
|
841
|
|
7
|
|
|
|
|
|
|
|
8
|
8
|
|
|
8
|
|
52
|
use Carp; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
1519
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my $hide_deprecation_warning; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub import { |
13
|
15
|
100
|
66
|
15
|
|
134
|
$hide_deprecation_warning = 1 if $_[1] and $_[1] eq ':hide'; |
14
|
15
|
|
|
|
|
43
|
__PACKAGE__->show_once(); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub show_once { |
18
|
33
|
|
|
33
|
0
|
65
|
my $class = shift; |
19
|
33
|
|
|
|
|
42
|
state $did_show_deprecation_warning; |
20
|
|
|
|
|
|
|
|
21
|
33
|
100
|
|
|
|
113
|
$did_show_deprecation_warning = |
22
|
|
|
|
|
|
|
$class->show() |
23
|
|
|
|
|
|
|
unless $did_show_deprecation_warning; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub show { |
27
|
28
|
|
|
28
|
0
|
41
|
my $class = shift; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
return if |
30
|
|
|
|
|
|
|
$hide_deprecation_warning |
31
|
|
|
|
|
|
|
or |
32
|
28
|
100
|
66
|
|
|
20712
|
$ENV{HTTP_CACHING_DEPRECATION_WARNING_HIDE}; |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
|
|
1
|
my $deprecation_warning = q{ |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
######################################################################## |
37
|
|
|
|
|
|
|
#### #### |
38
|
|
|
|
|
|
|
#### DEPRECATION WARNING !!! #### |
39
|
|
|
|
|
|
|
#### #### |
40
|
|
|
|
|
|
|
#### This module is going to be completely redesigned!!! #### |
41
|
|
|
|
|
|
|
#### #### |
42
|
|
|
|
|
|
|
#### As it was planned, these are the brains, but unfortunately, it #### |
43
|
|
|
|
|
|
|
#### has become an implementation. #### |
44
|
|
|
|
|
|
|
#### #### |
45
|
|
|
|
|
|
|
#### The future version will answer two questions: #### |
46
|
|
|
|
|
|
|
#### - may_store #### |
47
|
|
|
|
|
|
|
#### - may_reuse #### |
48
|
|
|
|
|
|
|
#### #### |
49
|
|
|
|
|
|
|
#### Those are currently implemented as private methods. #### |
50
|
|
|
|
|
|
|
#### #### |
51
|
|
|
|
|
|
|
#### Please contact the author if you rely on this module directly #### |
52
|
|
|
|
|
|
|
#### to prevent breakage #### |
53
|
|
|
|
|
|
|
#### #### |
54
|
|
|
|
|
|
|
#### Sorry for any inconvenience #### |
55
|
|
|
|
|
|
|
#### #### |
56
|
|
|
|
|
|
|
#### ADVICE: #### |
57
|
|
|
|
|
|
|
#### #### |
58
|
|
|
|
|
|
|
#### Please use the latest version of: #### |
59
|
|
|
|
|
|
|
#### - LPW::UserAgent::Caching #### |
60
|
|
|
|
|
|
|
#### - LWP::UserAgent::Caching::Simple #### |
61
|
|
|
|
|
|
|
#### #### |
62
|
|
|
|
|
|
|
######################################################################## |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
}; |
65
|
|
|
|
|
|
|
|
66
|
1
|
|
|
|
|
27
|
return carp $deprecation_warning |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |