line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package File::Find::Rule::Age; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
305209
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
183
|
|
4
|
5
|
|
|
5
|
|
26
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
243
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "0.302"; |
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
26
|
use base "File::Find::Rule"; |
|
5
|
|
|
|
|
21
|
|
|
5
|
|
|
|
|
5177
|
|
9
|
|
|
|
|
|
|
|
10
|
5
|
|
|
5
|
|
44387
|
use Carp 'carp'; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
246
|
|
11
|
5
|
|
|
5
|
|
7343
|
use DateTime; |
|
5
|
|
|
|
|
960124
|
|
|
5
|
|
|
|
|
225
|
|
12
|
5
|
|
|
5
|
|
2030
|
use File::stat; |
|
5
|
|
|
|
|
12624
|
|
|
5
|
|
|
|
|
54
|
|
13
|
5
|
|
|
5
|
|
468
|
use Params::Util qw(_STRING _NONNEGINT _INSTANCE); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
16511
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my %mapping = ( |
16
|
|
|
|
|
|
|
"D" => "days", |
17
|
|
|
|
|
|
|
"W" => "weeks", |
18
|
|
|
|
|
|
|
"M" => "months", |
19
|
|
|
|
|
|
|
"Y" => "years", |
20
|
|
|
|
|
|
|
"h" => "hours", |
21
|
|
|
|
|
|
|
"m" => "minutes", |
22
|
|
|
|
|
|
|
"s" => "seconds", |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my %criteria = ( |
26
|
|
|
|
|
|
|
older => 1, |
27
|
|
|
|
|
|
|
newer => 1, |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub File::Find::Rule::age |
31
|
|
|
|
|
|
|
{ |
32
|
4
|
|
|
4
|
0
|
7271
|
my ( $me, $criterion, $age ) = @_; |
33
|
4
|
|
|
|
|
18
|
my ( $interval, $unit ) = ( $age =~ m/^(\d+)([DWMYhms])$/ ); |
34
|
4
|
100
|
66
|
|
|
169
|
return carp "Duration or Unit missing" unless ( $interval and $unit ); |
35
|
|
|
|
|
|
|
|
36
|
3
|
|
|
|
|
7
|
$criterion = lc($criterion); |
37
|
3
|
100
|
|
|
|
223
|
defined $criteria{$criterion} or return carp "Invalid criterion: $criterion"; |
38
|
|
|
|
|
|
|
|
39
|
2
|
|
|
|
|
8
|
my $self = $me->_force_object; |
40
|
|
|
|
|
|
|
my $sub2exec = $criterion eq "older" |
41
|
|
|
|
|
|
|
? sub { |
42
|
2
|
|
|
2
|
|
976
|
my $dt = DateTime->now; |
43
|
2
|
|
|
|
|
348
|
$dt->subtract( $mapping{$unit} => $interval ); |
44
|
2
|
|
|
|
|
1044
|
stat($_)->mtime < $dt->epoch; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
: sub { |
47
|
2
|
|
|
2
|
|
777
|
my $dt = DateTime->now; |
48
|
2
|
|
|
|
|
418
|
$dt->subtract( $mapping{$unit} => $interval ); |
49
|
2
|
|
|
|
|
1050
|
stat($_)->mtime > $dt->epoch; |
50
|
2
|
100
|
|
|
|
22
|
}; |
51
|
2
|
|
|
|
|
9
|
$self->exec($sub2exec); |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub File::Find::Rule::modified_before |
55
|
|
|
|
|
|
|
{ |
56
|
5
|
|
|
5
|
0
|
6756
|
my ( $me, $ts ) = @_; |
57
|
|
|
|
|
|
|
|
58
|
5
|
|
|
|
|
16
|
my $self = $me->_force_object; |
59
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
60
|
|
|
|
|
|
|
sub { |
61
|
4
|
|
|
4
|
|
1329
|
stat($_)->mtime < stat($ts)->mtime; |
62
|
|
|
|
|
|
|
} |
63
|
5
|
100
|
100
|
|
|
126
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
66
|
|
|
|
|
|
|
sub { |
67
|
4
|
|
|
4
|
|
1144
|
stat($_)->mtime < $ts; |
68
|
|
|
|
|
|
|
} |
69
|
4
|
100
|
|
|
|
102
|
); |
70
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
71
|
|
|
|
|
|
|
sub { |
72
|
4
|
|
|
4
|
|
1260
|
stat($_)->mtime < $ts->epoch; |
73
|
|
|
|
|
|
|
} |
74
|
3
|
100
|
|
|
|
45
|
); |
75
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
76
|
|
|
|
|
|
|
sub { |
77
|
4
|
|
|
4
|
|
1251
|
my $dt = DateTime->now() - $ts; |
78
|
4
|
|
|
|
|
3127
|
stat($_)->mtime < $dt->epoch; |
79
|
|
|
|
|
|
|
} |
80
|
2
|
100
|
|
|
|
19
|
); |
81
|
1
|
|
|
|
|
197
|
carp "Cannot parse reference"; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub File::Find::Rule::modified_until |
85
|
|
|
|
|
|
|
{ |
86
|
5
|
|
|
5
|
0
|
6452
|
my ( $me, $ts ) = @_; |
87
|
|
|
|
|
|
|
|
88
|
5
|
|
|
|
|
16
|
my $self = $me->_force_object; |
89
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
90
|
|
|
|
|
|
|
sub { |
91
|
4
|
|
|
4
|
|
1388
|
stat($_)->mtime <= stat($ts)->mtime; |
92
|
|
|
|
|
|
|
} |
93
|
5
|
100
|
100
|
|
|
115
|
); |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
96
|
|
|
|
|
|
|
sub { |
97
|
4
|
|
|
4
|
|
1156
|
stat($_)->mtime <= $ts; |
98
|
|
|
|
|
|
|
} |
99
|
4
|
100
|
|
|
|
102
|
); |
100
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
101
|
|
|
|
|
|
|
sub { |
102
|
4
|
|
|
4
|
|
1118
|
stat($_)->mtime <= $ts->epoch; |
103
|
|
|
|
|
|
|
} |
104
|
3
|
100
|
|
|
|
42
|
); |
105
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
106
|
|
|
|
|
|
|
sub { |
107
|
4
|
|
|
4
|
|
1119
|
my $dt = DateTime->now() - $ts; |
108
|
4
|
|
|
|
|
2895
|
stat($_)->mtime <= $dt->epoch; |
109
|
|
|
|
|
|
|
} |
110
|
2
|
100
|
|
|
|
17
|
); |
111
|
1
|
|
|
|
|
237
|
carp "Cannot parse reference"; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub File::Find::Rule::modified_since |
115
|
|
|
|
|
|
|
{ |
116
|
5
|
|
|
5
|
0
|
9455
|
my ( $me, $ts ) = @_; |
117
|
|
|
|
|
|
|
|
118
|
5
|
|
|
|
|
14
|
my $self = $me->_force_object; |
119
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
120
|
|
|
|
|
|
|
sub { |
121
|
4
|
|
|
4
|
|
1724
|
stat($_)->mtime >= stat($ts)->mtime; |
122
|
|
|
|
|
|
|
} |
123
|
5
|
100
|
100
|
|
|
105
|
); |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
126
|
|
|
|
|
|
|
sub { |
127
|
4
|
|
|
4
|
|
988
|
stat($_)->mtime >= $ts; |
128
|
|
|
|
|
|
|
} |
129
|
4
|
100
|
|
|
|
101
|
); |
130
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
131
|
|
|
|
|
|
|
sub { |
132
|
4
|
|
|
4
|
|
1024
|
stat($_)->mtime >= $ts->epoch; |
133
|
|
|
|
|
|
|
} |
134
|
3
|
100
|
|
|
|
39
|
); |
135
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
136
|
|
|
|
|
|
|
sub { |
137
|
4
|
|
|
4
|
|
1061
|
my $dt = DateTime->now() - $ts; |
138
|
4
|
|
|
|
|
1358
|
stat($_)->mtime >= $dt->epoch; |
139
|
|
|
|
|
|
|
} |
140
|
2
|
100
|
|
|
|
18
|
); |
141
|
1
|
|
|
|
|
277
|
carp "Cannot parse reference"; |
142
|
|
|
|
|
|
|
} |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
sub File::Find::Rule::modified_after |
145
|
|
|
|
|
|
|
{ |
146
|
5
|
|
|
5
|
0
|
5862
|
my ( $me, $ts ) = @_; |
147
|
|
|
|
|
|
|
|
148
|
5
|
|
|
|
|
12
|
my $self = $me->_force_object; |
149
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
150
|
|
|
|
|
|
|
sub { |
151
|
4
|
|
|
4
|
|
1280
|
stat($_)->mtime > stat($ts)->mtime; |
152
|
|
|
|
|
|
|
} |
153
|
5
|
100
|
100
|
|
|
124
|
); |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
156
|
|
|
|
|
|
|
sub { |
157
|
4
|
|
|
4
|
|
933
|
stat($_)->mtime > $ts; |
158
|
|
|
|
|
|
|
} |
159
|
4
|
100
|
|
|
|
96
|
); |
160
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
161
|
|
|
|
|
|
|
sub { |
162
|
4
|
|
|
4
|
|
1151
|
stat($_)->mtime > $ts->epoch; |
163
|
|
|
|
|
|
|
} |
164
|
3
|
100
|
|
|
|
38
|
); |
165
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
166
|
|
|
|
|
|
|
sub { |
167
|
4
|
|
|
4
|
|
1030
|
my $dt = DateTime->now() - $ts; |
168
|
4
|
|
|
|
|
2653
|
stat($_)->mtime > $dt->epoch; |
169
|
|
|
|
|
|
|
} |
170
|
2
|
100
|
|
|
|
14
|
); |
171
|
1
|
|
|
|
|
194
|
carp "Cannot parse reference"; |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
############################################################################# |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
sub File::Find::Rule::accessed_before |
177
|
|
|
|
|
|
|
{ |
178
|
5
|
|
|
5
|
0
|
6488
|
my ( $me, $ts ) = @_; |
179
|
|
|
|
|
|
|
|
180
|
5
|
|
|
|
|
14
|
my $self = $me->_force_object; |
181
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
182
|
|
|
|
|
|
|
sub { |
183
|
4
|
|
|
4
|
|
1384
|
stat($_)->atime < stat($ts)->atime; |
184
|
|
|
|
|
|
|
} |
185
|
5
|
100
|
100
|
|
|
127
|
); |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
188
|
|
|
|
|
|
|
sub { |
189
|
4
|
|
|
4
|
|
1214
|
stat($_)->atime < $ts; |
190
|
|
|
|
|
|
|
} |
191
|
4
|
100
|
|
|
|
100
|
); |
192
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
193
|
|
|
|
|
|
|
sub { |
194
|
4
|
|
|
4
|
|
1075
|
stat($_)->atime < $ts->epoch; |
195
|
|
|
|
|
|
|
} |
196
|
3
|
100
|
|
|
|
46
|
); |
197
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
198
|
|
|
|
|
|
|
sub { |
199
|
4
|
|
|
4
|
|
1173
|
my $dt = DateTime->now() - $ts; |
200
|
4
|
|
|
|
|
2949
|
stat($_)->atime < $dt->epoch; |
201
|
|
|
|
|
|
|
} |
202
|
2
|
100
|
|
|
|
17
|
); |
203
|
1
|
|
|
|
|
205
|
carp "Cannot parse reference"; |
204
|
|
|
|
|
|
|
} |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
sub File::Find::Rule::accessed_until |
207
|
|
|
|
|
|
|
{ |
208
|
5
|
|
|
5
|
0
|
6483
|
my ( $me, $ts ) = @_; |
209
|
|
|
|
|
|
|
|
210
|
5
|
|
|
|
|
16
|
my $self = $me->_force_object; |
211
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
212
|
|
|
|
|
|
|
sub { |
213
|
4
|
|
|
4
|
|
1518
|
stat($_)->atime <= stat($ts)->atime; |
214
|
|
|
|
|
|
|
} |
215
|
5
|
100
|
100
|
|
|
110
|
); |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
218
|
|
|
|
|
|
|
sub { |
219
|
4
|
|
|
4
|
|
994
|
stat($_)->atime <= $ts; |
220
|
|
|
|
|
|
|
} |
221
|
4
|
100
|
|
|
|
89
|
); |
222
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
223
|
|
|
|
|
|
|
sub { |
224
|
4
|
|
|
4
|
|
1026
|
stat($_)->atime <= $ts->epoch; |
225
|
|
|
|
|
|
|
} |
226
|
3
|
100
|
|
|
|
39
|
); |
227
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
228
|
|
|
|
|
|
|
sub { |
229
|
4
|
|
|
4
|
|
1196
|
my $dt = DateTime->now() - $ts; |
230
|
4
|
|
|
|
|
2953
|
stat($_)->atime <= $dt->epoch; |
231
|
|
|
|
|
|
|
} |
232
|
2
|
100
|
|
|
|
14
|
); |
233
|
1
|
|
|
|
|
233
|
carp "Cannot parse reference"; |
234
|
|
|
|
|
|
|
} |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
sub File::Find::Rule::accessed_since |
237
|
|
|
|
|
|
|
{ |
238
|
5
|
|
|
5
|
0
|
11231
|
my ( $me, $ts ) = @_; |
239
|
|
|
|
|
|
|
|
240
|
5
|
|
|
|
|
19
|
my $self = $me->_force_object; |
241
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
242
|
|
|
|
|
|
|
sub { |
243
|
4
|
|
|
4
|
|
1779
|
stat($_)->atime >= stat($ts)->atime; |
244
|
|
|
|
|
|
|
} |
245
|
5
|
100
|
100
|
|
|
119
|
); |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
248
|
|
|
|
|
|
|
sub { |
249
|
4
|
|
|
4
|
|
1223
|
stat($_)->atime >= $ts; |
250
|
|
|
|
|
|
|
} |
251
|
4
|
100
|
|
|
|
114
|
); |
252
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
253
|
|
|
|
|
|
|
sub { |
254
|
4
|
|
|
4
|
|
1193
|
stat($_)->atime >= $ts->epoch; |
255
|
|
|
|
|
|
|
} |
256
|
3
|
100
|
|
|
|
54
|
); |
257
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
258
|
|
|
|
|
|
|
sub { |
259
|
4
|
|
|
4
|
|
1145
|
my $dt = DateTime->now() - $ts; |
260
|
4
|
|
|
|
|
1504
|
stat($_)->atime >= $dt->epoch; |
261
|
|
|
|
|
|
|
} |
262
|
2
|
100
|
|
|
|
20
|
); |
263
|
1
|
|
|
|
|
262
|
carp "Cannot parse reference"; |
264
|
|
|
|
|
|
|
} |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
sub File::Find::Rule::accessed_after |
267
|
|
|
|
|
|
|
{ |
268
|
5
|
|
|
5
|
0
|
7233
|
my ( $me, $ts ) = @_; |
269
|
|
|
|
|
|
|
|
270
|
5
|
|
|
|
|
18
|
my $self = $me->_force_object; |
271
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
272
|
|
|
|
|
|
|
sub { |
273
|
4
|
|
|
4
|
|
1464
|
stat($_)->atime > stat($ts)->atime; |
274
|
|
|
|
|
|
|
} |
275
|
5
|
100
|
100
|
|
|
142
|
); |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
278
|
|
|
|
|
|
|
sub { |
279
|
4
|
|
|
4
|
|
1016
|
stat($_)->atime > $ts; |
280
|
|
|
|
|
|
|
} |
281
|
4
|
100
|
|
|
|
111
|
); |
282
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
283
|
|
|
|
|
|
|
sub { |
284
|
4
|
|
|
4
|
|
1042
|
stat($_)->atime > $ts->epoch; |
285
|
|
|
|
|
|
|
} |
286
|
3
|
100
|
|
|
|
45
|
); |
287
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
288
|
|
|
|
|
|
|
sub { |
289
|
4
|
|
|
4
|
|
1132
|
my $dt = DateTime->now() - $ts; |
290
|
4
|
|
|
|
|
2625
|
stat($_)->atime > $dt->epoch; |
291
|
|
|
|
|
|
|
} |
292
|
2
|
100
|
|
|
|
19
|
); |
293
|
1
|
|
|
|
|
236
|
carp "Cannot parse reference"; |
294
|
|
|
|
|
|
|
} |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
############################################################################# |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
sub File::Find::Rule::created_before |
299
|
|
|
|
|
|
|
{ |
300
|
0
|
|
|
0
|
0
|
|
my ( $me, $ts ) = @_; |
301
|
|
|
|
|
|
|
|
302
|
0
|
|
|
|
|
|
my $self = $me->_force_object; |
303
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
304
|
|
|
|
|
|
|
sub { |
305
|
0
|
|
|
0
|
|
|
stat($_)->ctime < stat($ts)->ctime; |
306
|
|
|
|
|
|
|
} |
307
|
0
|
0
|
0
|
|
|
|
); |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
310
|
|
|
|
|
|
|
sub { |
311
|
0
|
|
|
0
|
|
|
stat($_)->ctime < $ts; |
312
|
|
|
|
|
|
|
} |
313
|
0
|
0
|
|
|
|
|
); |
314
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
315
|
|
|
|
|
|
|
sub { |
316
|
0
|
|
|
0
|
|
|
stat($_)->ctime < $ts->epoch; |
317
|
|
|
|
|
|
|
} |
318
|
0
|
0
|
|
|
|
|
); |
319
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
320
|
|
|
|
|
|
|
sub { |
321
|
0
|
|
|
0
|
|
|
my $dt = DateTime->now() - $ts; |
322
|
0
|
|
|
|
|
|
stat($_)->ctime < $dt->epoch; |
323
|
|
|
|
|
|
|
} |
324
|
0
|
0
|
|
|
|
|
); |
325
|
0
|
|
|
|
|
|
carp "Cannot parse reference"; |
326
|
|
|
|
|
|
|
} |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
sub File::Find::Rule::created_until |
329
|
|
|
|
|
|
|
{ |
330
|
0
|
|
|
0
|
0
|
|
my ( $me, $ts ) = @_; |
331
|
|
|
|
|
|
|
|
332
|
0
|
|
|
|
|
|
my $self = $me->_force_object; |
333
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
334
|
|
|
|
|
|
|
sub { |
335
|
0
|
|
|
0
|
|
|
stat($_)->ctime <= stat($ts)->ctime; |
336
|
|
|
|
|
|
|
} |
337
|
0
|
0
|
0
|
|
|
|
); |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
340
|
|
|
|
|
|
|
sub { |
341
|
0
|
|
|
0
|
|
|
stat($_)->ctime <= $ts; |
342
|
|
|
|
|
|
|
} |
343
|
0
|
0
|
|
|
|
|
); |
344
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
345
|
|
|
|
|
|
|
sub { |
346
|
0
|
|
|
0
|
|
|
stat($_)->ctime <= $ts->epoch; |
347
|
|
|
|
|
|
|
} |
348
|
0
|
0
|
|
|
|
|
); |
349
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
350
|
|
|
|
|
|
|
sub { |
351
|
0
|
|
|
0
|
|
|
my $dt = DateTime->now() - $ts; |
352
|
0
|
|
|
|
|
|
stat($_)->ctime <= $dt->epoch; |
353
|
|
|
|
|
|
|
} |
354
|
0
|
0
|
|
|
|
|
); |
355
|
0
|
|
|
|
|
|
carp "Cannot parse reference"; |
356
|
|
|
|
|
|
|
} |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
sub File::Find::Rule::created_since |
359
|
|
|
|
|
|
|
{ |
360
|
0
|
|
|
0
|
0
|
|
my ( $me, $ts ) = @_; |
361
|
|
|
|
|
|
|
|
362
|
0
|
|
|
|
|
|
my $self = $me->_force_object; |
363
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
364
|
|
|
|
|
|
|
sub { |
365
|
0
|
|
|
0
|
|
|
stat($_)->ctime >= stat($ts)->ctime; |
366
|
|
|
|
|
|
|
} |
367
|
0
|
0
|
0
|
|
|
|
); |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
370
|
|
|
|
|
|
|
sub { |
371
|
0
|
|
|
0
|
|
|
stat($_)->ctime >= $ts; |
372
|
|
|
|
|
|
|
} |
373
|
0
|
0
|
|
|
|
|
); |
374
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
375
|
|
|
|
|
|
|
sub { |
376
|
0
|
|
|
0
|
|
|
stat($_)->ctime >= $ts->epoch; |
377
|
|
|
|
|
|
|
} |
378
|
0
|
0
|
|
|
|
|
); |
379
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
380
|
|
|
|
|
|
|
sub { |
381
|
0
|
|
|
0
|
|
|
my $dt = DateTime->now() - $ts; |
382
|
0
|
|
|
|
|
|
stat($_)->ctime >= $dt->epoch; |
383
|
|
|
|
|
|
|
} |
384
|
0
|
0
|
|
|
|
|
); |
385
|
0
|
|
|
|
|
|
carp "Cannot parse reference"; |
386
|
|
|
|
|
|
|
} |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
sub File::Find::Rule::created_after |
389
|
|
|
|
|
|
|
{ |
390
|
0
|
|
|
0
|
0
|
|
my ( $me, $ts ) = @_; |
391
|
|
|
|
|
|
|
|
392
|
0
|
|
|
|
|
|
my $self = $me->_force_object; |
393
|
|
|
|
|
|
|
_STRING($ts) and -e $ts and return $self->exec( |
394
|
|
|
|
|
|
|
sub { |
395
|
0
|
|
|
0
|
|
|
stat($_)->ctime > stat($ts)->ctime; |
396
|
|
|
|
|
|
|
} |
397
|
0
|
0
|
0
|
|
|
|
); |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
_NONNEGINT($ts) and return $self->exec( |
400
|
|
|
|
|
|
|
sub { |
401
|
0
|
|
|
0
|
|
|
stat($_)->ctime > $ts; |
402
|
|
|
|
|
|
|
} |
403
|
0
|
0
|
|
|
|
|
); |
404
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime" ) and return $self->exec( |
405
|
|
|
|
|
|
|
sub { |
406
|
0
|
|
|
0
|
|
|
stat($_)->ctime > $ts->epoch; |
407
|
|
|
|
|
|
|
} |
408
|
0
|
0
|
|
|
|
|
); |
409
|
|
|
|
|
|
|
_INSTANCE( $ts, "DateTime::Duration" ) and return $self->exec( |
410
|
|
|
|
|
|
|
sub { |
411
|
0
|
|
|
0
|
|
|
my $dt = DateTime->now() - $ts; |
412
|
0
|
|
|
|
|
|
stat($_)->ctime > $dt->epoch; |
413
|
|
|
|
|
|
|
} |
414
|
0
|
0
|
|
|
|
|
); |
415
|
0
|
|
|
|
|
|
carp "Cannot parse reference"; |
416
|
|
|
|
|
|
|
} |
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
############################################################################# |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
1; |
421
|
|
|
|
|
|
|
__END__ |