line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Articulate::Enrichment::DateUpdated; |
2
|
6
|
|
|
6
|
|
3336
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
202
|
|
3
|
6
|
|
|
6
|
|
27
|
use warnings; |
|
6
|
|
|
|
|
9
|
|
|
6
|
|
|
|
|
137
|
|
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
25
|
use Text::Markdown; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
172
|
|
6
|
6
|
|
|
6
|
|
26
|
use Moo; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
36
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Articulate::Enrichment::DateUpdated - add a update date to the meta |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 METHODS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head3 enrich |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Sets the update date (C) to the current |
17
|
|
|
|
|
|
|
time. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
6
|
|
1572
|
use DateTime; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
604
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub _now { |
24
|
2
|
|
|
2
|
|
10
|
DateTime->now; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub enrich { |
28
|
2
|
|
|
2
|
1
|
6
|
my $self = shift; |
29
|
2
|
|
|
|
|
5
|
my $item = shift; |
30
|
2
|
|
|
|
|
4
|
my $request = shift; |
31
|
2
|
|
|
|
|
9
|
my $now = _now; |
32
|
2
|
|
|
|
|
545
|
$item->meta->{schema}->{core}->{dateUpdated} = "$now"; |
33
|
2
|
|
|
|
|
78
|
return $item; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |