1use warnings; 2use strict; 3 4package Data::ICal::Entry::Alarm::Display; 5 6use base qw/Data::ICal::Entry::Alarm/; 7 8=head1 NAME 9 10Data::ICal::Entry::Alarm::Display - Represents a displayed alarm in an iCalendar file 11 12=head1 SYNOPSIS 13 14 my $valarm = Data::ICal::Entry::Alarm::Display->new(); 15 $valarm->add_properties( 16 description => "Wake up!", 17 # Dat*e*::ICal is not a typo here 18 trigger => [ Date::ICal->new( epoch => ... )->ical, { value => 'DATE-TIME' } ], 19 ); 20 21 $vevent->add_entry($valarm); 22 23=head1 DESCRIPTION 24 25A L<Data::ICal::Entry::Alarm::Display> object represents a alarm that 26displays a message which is attached to a todo item or event in an 27iCalendar file. (Note that the iCalendar RFC refers to entries as 28"components".) It is a subclass of L<Data::ICal::Entry::Alarm> and 29accepts all of its methods. 30 31=head1 METHODS 32 33=cut 34 35=head2 new 36 37Creates a new L<Data::ICal::Entry::Alarm::Display> object; sets its 38C<ACTION> property to C<DISPLAY>. 39 40=cut 41 42sub new { 43 my $class = shift; 44 my $self = $class->SUPER::new(@_); 45 $self->add_property( action => "DISPLAY" ); 46 return $self; 47} 48 49=head2 mandatory_unique_properties 50 51In addition to C<action> and C<trigger> (see 52L<Data::ICal::Entry::Alarm/mandatory_unique_properties>), displayed 53alarms must also specify a value for C<description>. 54 55=cut 56 57sub mandatory_unique_properties { 58 return ( 59 shift->SUPER::mandatory_unique_properties, 60 "description", 61 ); 62} 63 64=head1 AUTHOR 65 66Best Practical Solutions, LLC E<lt>modules@bestpractical.comE<gt> 67 68=head1 LICENCE AND COPYRIGHT 69 70Copyright (c) 2005 - 2020, Best Practical Solutions, LLC. All rights reserved. 71 72This module is free software; you can redistribute it and/or 73modify it under the same terms as Perl itself. See L<perlartistic>. 74 75=cut 76 771; 78