aboutsummaryrefslogtreecommitdiff
path: root/lib/Object/Groupware/Event.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Object/Groupware/Event.pm')
-rw-r--r--lib/Object/Groupware/Event.pm22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/Object/Groupware/Event.pm b/lib/Object/Groupware/Event.pm
index 4b04393..a7f5842 100644
--- a/lib/Object/Groupware/Event.pm
+++ b/lib/Object/Groupware/Event.pm
@@ -1,7 +1,7 @@
use v5.36;
#use Feature::Compat::Class 0.07;
-use Object::Pad 0.78 qw(:experimental(init_expr));
+use Object::Pad 0.78;
package Object::Groupware::Event 0.01;
@@ -14,22 +14,30 @@ use Feature::Compat::Try;
use DateTime::Locale;
use Encode qw(decode_utf8);
-field $log = Log::Any->get_logger;
+field $log = undef;
field $entry : param;
field $dt_locale;
field $span;
-field $start : reader = $entry->start;
-field $end : reader = $entry->end;
-field $summary : reader = decode_utf8 $entry->summary;
-field $description : reader = decode_utf8 $entry->description || '';
-field $location : reader = decode_utf8 $entry->_simple_property('location');
+field $start : reader = undef;
+field $end : reader = undef;
+field $summary : reader = undef;
+field $description : reader = undef;
+field $location : reader = undef;
field $price : reader;
field @attendees;
field @attachments;
ADJUST {
+ # TODO: use Object::Pad 0.07 and move these to field initializer
+ $log //= Log::Any->get_logger;
+ $start //= $entry->start;
+ $end //= $entry->end;
+ $summary //= decode_utf8 $entry->summary;
+ $description //= decode_utf8 $entry->description || '';
+ $location //= decode_utf8 $entry->_simple_property('location');
+
if ( $self->dt_locale ) {
$dt_locale = $self->dt_locale;
$start->set_locale($dt_locale);