| 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::URI; | ||
| 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::URI - Represents notification via a custom URI | ||
| 11 | |||
| 12 | =head1 SYNOPSIS | ||
| 13 | |||
| 14 | my $valarm = Data::ICal::Entry::Alarm::URI->new(); | ||
| 15 | $valarm->add_properties( | ||
| 16 | uri => "sms:+15105550101?body=hello%20there", | ||
| 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::URI> object represents an alarm that | ||
| 26 | notifies via arbitrary URI which is attached to a todo item or event in | ||
| 27 | an iCalendar file. (Note that the iCalendar RFC refers to entries as | ||
| 28 | "components".) It is a subclass of L<Data::ICal::Entry::Alarm> and | ||
| 29 | accepts all of its methods. | ||
| 30 | |||
| 31 | This element is not included in the official iCal RFC, but is rather an | ||
| 32 | unaccepted draft standard; see | ||
| 33 | L<https://tools.ietf.org/html/draft-daboo-valarm-extensions-04#section-6> | ||
| 34 | B<Its interoperability and support is thus limited.> This is alarm type | ||
| 35 | is primarily used by Apple. | ||
| 36 | |||
| 37 | =head1 METHODS | ||
| 38 | |||
| 39 | =cut | ||
| 40 | |||
| 41 | =head2 new | ||
| 42 | |||
| 43 | Creates a new L<Data::ICal::Entry::Alarm::Alarm> object; sets its | ||
| 44 | C<ACTION> property to C<NONE>. | ||
| 45 | |||
| 46 | =cut | ||
| 47 | |||
| 48 | 0 | ▶ | sub new { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 49 | 0 | my $class = shift; | |
| 50 | 0 | my $self = $class->SUPER::new(@_); | |
| 51 | 0 | $self->add_property( action => "URI" ); | |
| 52 | 0 | return $self; | |
| 53 | } | ||
| 54 | |||
| 55 | =head2 mandatory_unique_properties | ||
| 56 | |||
| 57 | In addition to C<action> and C<trigger> (see | ||
| 58 | L<Data::ICal::Entry::Alarm/mandatory_unique_properties>), uri alarms | ||
| 59 | must also specify a value for C<uri>. | ||
| 60 | |||
| 61 | =cut | ||
| 62 | |||
| 63 | 0 | ▶ | sub mandatory_unique_properties { |
|
Subroutine
mandatory_unique_properties: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 64 | return ( | ||
| 65 | shift->SUPER::mandatory_unique_properties, | ||
| 66 | 0 | "uri", | |
| 67 | ); | ||
| 68 | } | ||
| 69 | |||
| 70 | =head1 AUTHOR | ||
| 71 | |||
| 72 | Best Practical Solutions, LLC E<lt>modules@bestpractical.comE<gt> | ||
| 73 | |||
| 74 | =head1 LICENCE AND COPYRIGHT | ||
| 75 | |||
| 76 | Copyright (c) 2005 - 2020, Best Practical Solutions, LLC. All rights reserved. | ||
| 77 | |||
| 78 | This module is free software; you can redistribute it and/or | ||
| 79 | modify it under the same terms as Perl itself. See L<perlartistic>. | ||
| 80 | |||
| 81 | =cut | ||
| 82 | |||
| 83 | 1 | 1; | |