| 1 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | package Data::ICal::Entry::Alarm; | ||||||||||
| 5 | |||||||||||
| 6 | 3 | ▶ | use base qw/Data::ICal::Entry/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | =head1 NAME | ||||||||||
| 9 | |||||||||||
| 10 | Data::ICal::Entry::Alarm - Abstract base class for alarms | ||||||||||
| 11 | |||||||||||
| 12 | =head1 DESCRIPTION | ||||||||||
| 13 | |||||||||||
| 14 | L<Data::ICal::Entry::Alarm> is an abstract base class for the other type | ||||||||||
| 15 | of supported by alarms: | ||||||||||
| 16 | |||||||||||
| 17 | =over | ||||||||||
| 18 | |||||||||||
| 19 | =item L<Data::ICal::Entry::Alarm::Audio> | ||||||||||
| 20 | |||||||||||
| 21 | =item L<Data::ICal::Entry::Alarm::Display> | ||||||||||
| 22 | |||||||||||
| 23 | =item L<Data::ICal::Entry::Alarm::Email> | ||||||||||
| 24 | |||||||||||
| 25 | =item L<Data::ICal::Entry::Alarm::Procedure> | ||||||||||
| 26 | |||||||||||
| 27 | =back | ||||||||||
| 28 | |||||||||||
| 29 | It is a subclass of L<Data::ICal::Entry> and accepts all of its methods. | ||||||||||
| 30 | |||||||||||
| 31 | =head1 METHODS | ||||||||||
| 32 | |||||||||||
| 33 | =cut | ||||||||||
| 34 | |||||||||||
| 35 | =head2 new | ||||||||||
| 36 | |||||||||||
| 37 | |||||||||||
| 38 | =cut | ||||||||||
| 39 | |||||||||||
| 40 | 5 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 41 | 5 | my $class = shift; | |||||||||
| 42 | 5 | my $self = $class->SUPER::new(@_); | |||||||||
| 43 | 5 | ▶ | die "Can't instantiate abstract base class Data::ICal::Entry::Alarm" | ||||||||
|
Branch: 1 branch
| |||||||||||
| 44 | if $class eq __PACKAGE__; | ||||||||||
| 45 | 5 | return $self; | |||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | =head2 ical_entry_type | ||||||||||
| 49 | |||||||||||
| 50 | Returns C<VALARM>, its iCalendar entry name. | ||||||||||
| 51 | |||||||||||
| 52 | =cut | ||||||||||
| 53 | |||||||||||
| 54 | 4 | ▶ | sub ical_entry_type {'VALARM'} | ||||||||
|
Subroutine
ical_entry_type: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 55 | |||||||||||
| 56 | =head2 optional_unique_properties | ||||||||||
| 57 | |||||||||||
| 58 | According to the iCalendar standard, the C<duration> and C<retreat> | ||||||||||
| 59 | properties may be specified at most one time all types of alarms; if one | ||||||||||
| 60 | is specified, the other one must be also, though this module does not | ||||||||||
| 61 | enforce that restriction. | ||||||||||
| 62 | |||||||||||
| 63 | =cut | ||||||||||
| 64 | |||||||||||
| 65 | 60 | ▶ | sub optional_unique_properties { | ||||||||
|
Subroutine
optional_unique_properties: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 66 | 60 | qw( | |||||||||
| 67 | duration repeat | ||||||||||
| 68 | ); | ||||||||||
| 69 | } | ||||||||||
| 70 | |||||||||||
| 71 | =head2 mandatory_unique_properties | ||||||||||
| 72 | |||||||||||
| 73 | According to the iCalendar standard, the C<trigger> property must be | ||||||||||
| 74 | specified exactly once for an all types of alarms; subclasses may have | ||||||||||
| 75 | additional required properties. | ||||||||||
| 76 | |||||||||||
| 77 | In addition, the C<action> property must be specified exactly once, but | ||||||||||
| 78 | all subclasses automatically set said property appropriately. | ||||||||||
| 79 | |||||||||||
| 80 | =cut | ||||||||||
| 81 | |||||||||||
| 82 | 62 | ▶ | sub mandatory_unique_properties { | ||||||||
|
Subroutine
mandatory_unique_properties: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 83 | 62 | qw( | |||||||||
| 84 | action trigger | ||||||||||
| 85 | ); | ||||||||||
| 86 | } | ||||||||||
| 87 | |||||||||||
| 88 | =head1 AUTHOR | ||||||||||
| 89 | |||||||||||
| 90 | Best Practical Solutions, LLC E<lt>modules@bestpractical.comE<gt> | ||||||||||
| 91 | |||||||||||
| 92 | =head1 LICENCE AND COPYRIGHT | ||||||||||
| 93 | |||||||||||
| 94 | Copyright (c) 2005 - 2020, Best Practical Solutions, LLC. All rights reserved. | ||||||||||
| 95 | |||||||||||
| 96 | This module is free software; you can redistribute it and/or | ||||||||||
| 97 | modify it under the same terms as Perl itself. See L<perlartistic>. | ||||||||||
| 98 | |||||||||||
| 99 | =cut | ||||||||||
| 100 | |||||||||||
| 101 | 3 | 1; | |||||||||