ICal/Entry/Alarm/Display.pm

filter: Statementstmt 66.6% 10 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 68.1% 15 / 22 CC 1 SCAR 3.4
CC
1
Cov
67%
new
2.0
mandatory_unique_properties
2.0
BEGIN
1.0
CRAP 1.4
« ICal/Entry/Alarm/Procedure.pm ↑ Summary ICal/Entry/Alarm/URI.pm »
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::Display;
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::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  
25 A L<Data::ICal::Entry::Alarm::Display> object represents a alarm that
26 displays a message which is attached to a todo item or event in an
27 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 =head1 METHODS
32  
33 =cut
34  
35 =head2 new
36  
37 Creates a new L<Data::ICal::Entry::Alarm::Display> object; sets its
38 C<ACTION> property to C<DISPLAY>.
39  
40 =cut
41  
42 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
43 0 my $class = shift;
44 0 my $self = $class->SUPER::new(@_);
45 0 $self->add_property( action => "DISPLAY" );
46 0 return $self;
47 }
48  
49 =head2 mandatory_unique_properties
50  
51 In addition to C<action> and C<trigger> (see
52 L<Data::ICal::Entry::Alarm/mandatory_unique_properties>), displayed
53 alarms must also specify a value for C<description>.
54  
55 =cut
56  
57 0 ▶sub mandatory_unique_properties {
Subroutine mandatory_unique_properties: not called CC=1 SCAR=6.9
Pod documented
58 return (
59 shift->SUPER::mandatory_unique_properties,
60 0 "description",
61 );
62 }
63  
64 =head1 AUTHOR
65  
66 Best Practical Solutions, LLC E<lt>modules@bestpractical.comE<gt>
67  
68 =head1 LICENCE AND COPYRIGHT
69  
70 Copyright (c) 2005 - 2020, Best Practical Solutions, LLC. All rights reserved.
71  
72 This module is free software; you can redistribute it and/or
73 modify it under the same terms as Perl itself. See L<perlartistic>.
74  
75 =cut
76  
77 1 1;
« ICal/Entry/Alarm/Procedure.pm ↑ Summary ICal/Entry/Alarm/URI.pm »