ICal/Entry/Alarm/Audio.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 100% 22 / 22 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« ICal/Entry/Alarm/None.pm ↑ Summary ICal/Entry/TimeZone.pm »
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::Audio;
5  
6 3 ▶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::Audio - Represents an audio 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 => [ "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::Audio> object represents an audio alarm
26 attached to a todo item or event in an iCalendar file. (Note that the
27 iCalendar RFC refers to entries as "components".) It is a subclass of
28 L<Data::ICal::Entry::Alarm> and accepts all of its methods.
29  
30 =head1 METHODS
31  
32 =cut
33  
34 =head2 new
35  
36 Creates a new L<Data::ICal::Entry::Alarm::Audio> object; sets its
37 C<ACTION> property to C<AUDIO>.
38  
39 =cut
40  
41 5 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
42 5 my $class = shift;
43 5 my $self = $class->SUPER::new(@_);
44 5 $self->add_property( action => "AUDIO" );
45 5 return $self;
46 }
47  
48 =head2 optional_unique_properties
49  
50 In addition to C<duration> and C<repeat> (see
51 L<Data::ICal::Entry::Alarm/optional_unique_properties>), audio alarms
52 may specify a value for C<attach>.
53  
54 =cut
55  
56 60 ▶sub optional_unique_properties {
Subroutine optional_unique_properties: called CC=1 SCAR=0.0
Pod documented
57 return (
58 shift->SUPER::optional_unique_properties,
59 60 "attach",
60 );
61 }
62  
63 =head1 AUTHOR
64  
65 Best Practical Solutions, LLC E<lt>modules@bestpractical.comE<gt>
66  
67 =head1 LICENCE AND COPYRIGHT
68  
69 Copyright (c) 2005 - 2020, Best Practical Solutions, LLC. All rights reserved.
70  
71 This module is free software; you can redistribute it and/or
72 modify it under the same terms as Perl itself. See L<perlartistic>.
73  
74 =cut
75  
76 3 1;
« ICal/Entry/Alarm/None.pm ↑ Summary ICal/Entry/TimeZone.pm »