Catmandu/Fix/memento_find.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 96.1% 25 / 26 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Catmandu/Fix/issn.pm ↑ Summary Catmandu/Fix/uri_status_code.pm »
1 package Catmandu::Fix::memento_find;
2  
3 1 our $VERSION = '0.15';
4  
5 1 ▶use Catmandu::Sane;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Memento::TimeTravel;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Catmandu::Fix::Has;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 has path => (fix_arg => 1);
11 1 has date => (fix_arg => 1);
12  
13 1 with 'Catmandu::Fix::SimpleGetValue';
14  
15 1 ▶sub emit_value {
Subroutine emit_value: called CC=1 SCAR=0.0
Pod undocumented
16 1 my ($self, $var) = @_;
17 1 my $date = $self->date;
18  
19 1 "${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 1;
« Catmandu/Fix/issn.pm ↑ Summary Catmandu/Fix/uri_status_code.pm »