diff options
author | dakkar <dakkar@thenautilus.net> | 2011-03-26 13:44:35 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2011-03-26 13:44:35 +0000 |
commit | 63ea2492d1b7676d5aae7c9dd7912ca78159c321 (patch) | |
tree | 22ab40b24d45d55d34c93927408c38a9634eddf9 /lib/DeWeave/BO/History.pm | |
parent | collections working, subclasses, strings (diff) | |
download | DeWeave-63ea2492d1b7676d5aae7c9dd7912ca78159c321.tar.gz DeWeave-63ea2492d1b7676d5aae7c9dd7912ca78159c321.tar.bz2 DeWeave-63ea2492d1b7676d5aae7c9dd7912ca78159c321.zip |
many more BrowserObjects
Diffstat (limited to 'lib/DeWeave/BO/History.pm')
-rw-r--r-- | lib/DeWeave/BO/History.pm | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/DeWeave/BO/History.pm b/lib/DeWeave/BO/History.pm new file mode 100644 index 0000000..3e9040e --- /dev/null +++ b/lib/DeWeave/BO/History.pm @@ -0,0 +1,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; |