1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
package DeWeave::BO::History; use Moose; use namespace::autoclean; use MooseX::Types::Moose qw(Str ArrayRef Int); use MooseX::Types::Structured qw(Dict); extends 'DeWeave::EDO'; has histUri => ( isa => Str, required => 1, is => 'ro', ); has title => ( isa => Str, required => 0, is => 'ro', ); has visits => ( isa => ArrayRef[Dict[date => Int, type => Int]], required => 1, is => 'ro', ); { my @visit_types=( undef, 'link', 'typed', 'bookmark', 'embed', 'redirect_permanent', 'redirect_temporary', 'download', 'framed_link', ); sub visit_type { my ($self,$type_int) = @_; if ($type_int > 0 && $type_int < @visit_types) { return $visit_types[$type_int]; } return undef; } } 1;
|