line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Fix::memento_find; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.13'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
156553
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
151728
|
|
|
1
|
|
|
|
|
6
|
|
6
|
1
|
|
|
1
|
|
258
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
1
|
|
|
1
|
|
691
|
use Memento::TimeTravel; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
8
|
1
|
|
|
1
|
|
377
|
use Catmandu::Fix::Has; |
|
1
|
|
|
|
|
786
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has path => (fix_arg => 1); |
11
|
|
|
|
|
|
|
has date => (fix_arg => 1); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
with 'Catmandu::Fix::SimpleGetValue'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub emit_value { |
16
|
1
|
|
|
1
|
0
|
6407
|
my ($self, $var) = @_; |
17
|
1
|
|
|
|
|
5
|
my $date = $self->date; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
6
|
"${var} = Memento::TimeTravel::find_mementos(${var},${date}) if is_string(${var}) && length(${var});"; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 NAME |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Catmandu::Fix::memento_find - find Mementos for a url |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 SYNOPSIS |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# Find mementos for a URL. E.g. myurl => 'http://www.ugent.be' |
29
|
|
|
|
|
|
|
memento_find(myurl,2013) |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SEE ALSO |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
L<Catmandu::Fix> |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |