| 1 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | package Data::ICal::Entry::Alarm::Email; | ||
| 5 | |||
| 6 | 1 | ▶ | use base qw/Data::ICal::Entry::Alarm/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | Data::ICal::Entry::Alarm::Email - Represents an emailed alarm in an iCalendar file | ||
| 11 | |||
| 12 | =head1 SYNOPSIS | ||
| 13 | |||
| 14 | my $valarm = Data::ICal::Entry::Alarm::Audio->new(); | ||
| 15 | $valarm->add_properties( | ||
| 16 | attach => [ "basic:ftp://host.com/pub/sounds/bell-01.aud", { fmttype => "audio/basic" } ], | ||
| 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 | |||
| 25 | A L<Data::ICal::Entry::Alarm::Email> object represents an emailed | ||
| 26 | alarm attached to a todo item or event in an iCalendar file. (Note | ||
| 27 | that the iCalendar RFC refers to entries as "components".) It is a | ||
| 28 | subclass of L<Data::ICal::Entry::Alarm> and accepts all of its methods. | ||
| 29 | |||
| 30 | The C<attendee> properties are intended as the recipient list of the | ||
| 31 | email; the C<summary> as its subject; the C<description> as its body; | ||
| 32 | and the C<attach> as its attachments. | ||
| 33 | |||
| 34 | =head1 METHODS | ||
| 35 | |||
| 36 | =cut | ||
| 37 | |||
| 38 | =head2 new | ||
| 39 | |||
| 40 | Creates a new L<Data::ICal::Entry::Alarm::Email> object; sets its | ||
| 41 | C<ACTION> property to C<EMAIL>. | ||
| 42 | |||
| 43 | =cut | ||
| 44 | |||
| 45 | 0 | ▶ | sub new { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 46 | 0 | my $class = shift; | |
| 47 | 0 | my $self = $class->SUPER::new(@_); | |
| 48 | 0 | $self->add_property( action => "EMAIL" ); | |
| 49 | 0 | return $self; | |
| 50 | } | ||
| 51 | |||
| 52 | =head2 mandatory_unique_properties | ||
| 53 | |||
| 54 | In addition to C<action> and C<trigger> (see | ||
| 55 | L<Data::ICal::Entry::Alarm/mandatory_unique_properties>), emailed alarms | ||
| 56 | must also specify a value for C<description> and C<summary>. | ||
| 57 | |||
| 58 | =cut | ||
| 59 | |||
| 60 | 0 | ▶ | sub mandatory_unique_properties { |
|
Subroutine
mandatory_unique_properties: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 61 | return ( | ||
| 62 | shift->SUPER::mandatory_unique_properties, | ||
| 63 | 0 | "description", "summary", | |
| 64 | ); | ||
| 65 | } | ||
| 66 | |||
| 67 | =head2 mandatory_repeatable_properties | ||
| 68 | |||
| 69 | According to the iCalendar standard, the C<attendee> property must be | ||
| 70 | specified at least once for an emailed alarm. | ||
| 71 | |||
| 72 | =cut | ||
| 73 | |||
| 74 | 0 | ▶ | sub mandatory_repeatable_properties { |
|
Subroutine
mandatory_repeatable_properties: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 75 | 0 | qw( | |
| 76 | attendee | ||
| 77 | ); | ||
| 78 | } | ||
| 79 | |||
| 80 | =head2 optional_repeatable_properties | ||
| 81 | |||
| 82 | According to the iCalendar standard, the C<attach> property may be | ||
| 83 | specified any number of times for an emailed alarm. | ||
| 84 | |||
| 85 | =cut | ||
| 86 | |||
| 87 | 0 | ▶ | sub optional_repeatable_properties { |
|
Subroutine
optional_repeatable_properties: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 88 | 0 | qw( | |
| 89 | attach | ||
| 90 | ); | ||
| 91 | } | ||
| 92 | |||
| 93 | =head1 AUTHOR | ||
| 94 | |||
| 95 | Best Practical Solutions, LLC E<lt>modules@bestpractical.comE<gt> | ||
| 96 | |||
| 97 | =head1 LICENCE AND COPYRIGHT | ||
| 98 | |||
| 99 | Copyright (c) 2005 - 2020, Best Practical Solutions, LLC. All rights reserved. | ||
| 100 | |||
| 101 | This module is free software; you can redistribute it and/or | ||
| 102 | modify it under the same terms as Perl itself. See L<perlartistic>. | ||
| 103 | |||
| 104 | =cut | ||
| 105 | |||
| 106 | 1 | 1; | |